Skip to content

Commit ed5cc3b

Browse files
committed
feat: update GitHub Actions workflow for deploying demo to GitHub Pages
1 parent e477587 commit ed5cc3b

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/deploy-demo.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ on:
99
jobs:
1010
deploy:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
environment:
17+
name: github-pages
18+
url: ${{ steps.deployment.outputs.page_url }}
1219

1320
strategy:
1421
matrix:
@@ -34,9 +41,12 @@ jobs:
3441
- name: Build demo
3542
run: pnpm run build:demo
3643

44+
- name: Upload Pages artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: "./dist-demo"
48+
3749
- name: Deploy to GitHub Pages
50+
id: deployment
3851
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
39-
uses: peaceiris/actions-gh-pages@v3
40-
with:
41-
github_token: ${{ secrets.GITHUB_TOKEN }}
42-
publish_dir: ./dist-demo
52+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)