Skip to content

Commit 46ec0e0

Browse files
committed
update workflow
1 parent 7c17b94 commit 46ec0e0

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
918
jobs:
1019
build-and-deploy:
1120
runs-on: ubuntu-latest
@@ -31,9 +40,14 @@ jobs:
3140
cd demo
3241
npm run build
3342
34-
- name: Deploy to GitHub Pages
35-
uses: peaceiris/actions-gh-pages@v3
36-
if: github.ref == 'refs/heads/main'
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v4
45+
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v3
3748
with:
38-
github_token: ${{ secrets.GITHUB_TOKEN }}
39-
publish_dir: ./demo/out
49+
path: './demo/out'
50+
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)