Skip to content

Commit 6e14335

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

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,25 @@ 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+
- name: Upload static files as artifact
30+
id: deployment
31+
uses: actions/upload-pages-artifact@v3
3232
with:
33-
branch: gh-pages
34-
folder: test/dist
35-
single-commit: true
36-
force: true
33+
path: test/dist
34+
35+
deploy:
36+
if: github.event_name == 'push' && github.ref_name == 'main'
37+
needs: build
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
43+
permissions:
44+
pages: write
45+
id-token: write
46+
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)