Skip to content

Commit 2a6e7c4

Browse files
committed
[CI] Add required permissions for deploy token
1 parent 4a27182 commit 2a6e7c4

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
push:
44
branches: [main]
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
build:
811
runs-on: ubuntu-latest
@@ -20,15 +23,24 @@ jobs:
2023
- name: 'Upload build artifacts'
2124
uses: actions/upload-artifact@v4
2225
with:
23-
name: 'build-artifacts'
24-
path: 'dist/*'
26+
name: 'github-pages'
27+
path: './dist/*'
2528
deploy:
26-
environment:
27-
name: github-pages
28-
url: ${{ steps.deployment.outputs.page_url }}
2929
runs-on: ubuntu-latest
3030
needs: build
31+
permissions:
32+
id-token: write
33+
pages: write
34+
contents: write
3135
steps:
32-
- name: Deploy to GitHub Pages
33-
id: deployment
34-
uses: actions/deploy-pages@v4
36+
- name: 'Checkout code'
37+
uses: actions/checkout@v4
38+
- name: 'Getting artifacts'
39+
uses: actions/download-artifact@v4
40+
with:
41+
name: 'github-pages'
42+
- name: 'Deploy to GitHub Pages'
43+
uses: JamesIves/github-pages-deploy-action@v4
44+
with:
45+
branch: gh-pages
46+
folder: '.'

0 commit comments

Comments
 (0)