Skip to content

Commit 9de5572

Browse files
committed
Update to official GitHub Pages action with proper permissions
1 parent 68caa21 commit 9de5572

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/deploy.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
jobs:
1010
build-and-deploy:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
1216

1317
steps:
1418
- name: Checkout
@@ -26,13 +30,14 @@ jobs:
2630
- name: Build
2731
run: npm run build
2832

29-
- name: Deploy to GitHub Pages
30-
uses: peaceiris/actions-gh-pages@v3
31-
if: github.ref == 'refs/heads/main'
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v4
35+
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
3238
with:
33-
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
publish_dir: ./out
35-
force_orphan: true
36-
user_name: 'github-actions[bot]'
37-
user_email: 'github-actions[bot]@users.noreply.github.com'
38-
# cname: design.buzzvil.com # Optional: if you have a custom domain
39+
path: './out'
40+
41+
- name: Deploy to GitHub Pages
42+
id: deployment
43+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)