Skip to content

Commit 3cf1e24

Browse files
committed
Update deploy.yml
1 parent 6dd20ad commit 3cf1e24

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,20 @@ jobs:
2626
- run: cd test && npm i
2727
- run: node --run build
2828

29-
- name: Deploy
30-
if: github.event_name == 'push' && github.ref_name == 'main'
31-
uses: JamesIves/github-pages-deploy-action@v4
29+
deploy:
30+
if: github.event_name == 'push' && github.ref_name == 'main'
31+
needs: build
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
3240
with:
33-
branch: gh-pages
34-
folder: test/dist
35-
single-commit: true
36-
force: true
41+
path: test/dist
42+
43+
- name: Deploy to GitHub Pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)