Skip to content

Commit f667cbd

Browse files
fix: use new github pages deployment method
1 parent 0131e6e commit f667cbd

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

.github/workflows/deploy.yml

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

8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
820
jobs:
9-
build-and-deploy:
21+
build:
1022
runs-on: ubuntu-latest
1123

1224
steps:
@@ -25,8 +37,18 @@ jobs:
2537
- name: Build
2638
run: npm run build
2739

28-
- name: Deploy to GitHub Pages
29-
uses: peaceiris/actions-gh-pages@v3
40+
- name: Upload artifact
41+
uses: actions/upload-pages-artifact@v2
3042
with:
31-
github_token: ${{ secrets.GITHUB_TOKEN }}
32-
publish_dir: ./dist
43+
path: ./dist
44+
45+
deploy:
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
runs-on: ubuntu-latest
50+
needs: build
51+
steps:
52+
- name: Deploy to GitHub Pages
53+
id: deployment
54+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)