Skip to content

Commit f6034f4

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

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

.github/workflows/build.yml

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

6+
permissions:
7+
contents: read
8+
9+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
10+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
11+
concurrency:
12+
group: "pages"
13+
cancel-in-progress: false
14+
615
jobs:
716
build:
817
runs-on: ubuntu-latest
@@ -21,14 +30,28 @@ jobs:
2130
uses: actions/upload-artifact@v4
2231
with:
2332
name: 'build-artifacts'
24-
path: 'dist/*'
33+
path: './dist/*'
2534
deploy:
35+
runs-on: ubuntu-latest
36+
needs: build
37+
permissions:
38+
id-token: write
39+
pages: write
40+
contents: write
2641
environment:
2742
name: github-pages
2843
url: ${{ steps.deployment.outputs.page_url }}
29-
runs-on: ubuntu-latest
30-
needs: build
3144
steps:
45+
- name: Setup Pages
46+
uses: actions/configure-pages@v5
47+
- name: 'Getting artifacts'
48+
uses: actions/download-artifact@v4
49+
with:
50+
name: 'build-artifacts'
51+
- name: Upload artifact
52+
uses: actions/upload-pages-artifact@v3
53+
with:
54+
path: '.'
3255
- name: Deploy to GitHub Pages
3356
id: deployment
3457
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)