Skip to content

Commit ea0f43c

Browse files
author
Glasspham
committed
Fix GitHub Pages deployment workflow with proper permissions
1 parent 0167e08 commit ea0f43c

1 file changed

Lines changed: 7 additions & 20 deletions

File tree

.github/workflows/deploy.yml

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

8-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
8+
# Sets permissions of the GITHUB_TOKEN
99
permissions:
10-
contents: read
10+
contents: write
1111
pages: write
1212
id-token: write
1313

14-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15-
concurrency:
16-
group: "pages"
17-
cancel-in-progress: false
18-
1914
jobs:
2015
deploy:
21-
environment:
22-
name: github-pages
23-
url: ${{ steps.deployment.outputs.page_url }}
2416
runs-on: ubuntu-latest
2517

2618
steps:
@@ -39,14 +31,9 @@ jobs:
3931
- name: Build
4032
run: npm run build
4133

42-
- name: Setup Pages
43-
uses: actions/configure-pages@v4
44-
45-
- name: Upload artifact
46-
uses: actions/upload-pages-artifact@v3
47-
with:
48-
path: "./dist"
49-
5034
- name: Deploy to GitHub Pages
51-
id: deployment
52-
uses: actions/deploy-pages@v4
35+
uses: peaceiris/actions-gh-pages@v4
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: ./dist
39+
force_orphan: true

0 commit comments

Comments
 (0)