Skip to content

Commit 9916b94

Browse files
committed
Use official action to publish pages
1 parent 4d5abd8 commit 9916b94

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

.github/workflows/pages.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,27 @@ on:
44
push:
55
branches: master
66

7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: pages-${{ github.workflow }}-${{ github.ref }}
14+
715
jobs:
8-
deploy:
16+
build:
917
runs-on: ubuntu-latest
10-
concurrency:
11-
group: ${{ github.workflow }}-${{ github.ref }}
1218

1319
steps:
1420
- uses: actions/checkout@v3
1521
- uses: actions/setup-node@v3
1622
with:
1723
node-version: 16
1824

25+
- name: Setup Pages
26+
uses: actions/configure-pages@v1
27+
1928
- name: Install dependencies
2029
run: npm ci
2130

@@ -25,10 +34,16 @@ jobs:
2534
- name: Build
2635
run: npm run build:docs
2736

28-
- name: Deploy
29-
uses: peaceiris/actions-gh-pages@v3
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v1
3039
with:
31-
github_token: ${{ secrets.GITHUB_TOKEN }}
32-
publish_dir: ./demo/build
33-
user_name: 'github-actions[bot]'
34-
user_email: 'github-actions[bot]@users.noreply.github.com'
40+
path: './demo/build'
41+
42+
deploy:
43+
runs-on: ubuntu-latest
44+
needs: build
45+
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v1

0 commit comments

Comments
 (0)