Skip to content

Commit 724d1cd

Browse files
committed
fix: update actions
1 parent 0e933c4 commit 724d1cd

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

.github/workflows/publishwebsite.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,13 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
813
jobs:
9-
build-deploy:
14+
build:
1015
runs-on: ubuntu-latest
1116
steps:
1217
- name: Checkout code
@@ -21,15 +26,21 @@ jobs:
2126
- name: Install dependencies
2227
run: npm ci
2328

24-
- name: Test
25-
run: npm run test --if-present
26-
2729
- name: Build
2830
run: npm run build --if-present
2931

30-
- name: Deploy to GitHub Pages
31-
uses: peaceiris/actions-gh-pages@v3
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v2
3234
with:
33-
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
publish_dir: ./dist
35-
publish_branch: gh-pages
35+
path: ./dist
36+
37+
deploy:
38+
needs: build
39+
runs-on: ubuntu-latest
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)