Skip to content

Commit 315e563

Browse files
committed
Move permissions from workflow level to job level
(cherry picked from commit 10d3dcc)
1 parent a19da19 commit 315e563

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,11 @@ defaults:
2727
run:
2828
shell: bash
2929

30-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
31-
permissions:
32-
contents: read
33-
pages: write
34-
id-token: write
35-
3630
jobs:
3731
# Build job
3832
build:
33+
permissions:
34+
contents: read
3935
runs-on: ubuntu-latest
4036
env:
4137
HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.146.0' }}
@@ -66,6 +62,9 @@ jobs:
6662
path: ./public
6763
# Deployment job
6864
deploy:
65+
permissions:
66+
pages: write
67+
id-token: write
6968
environment:
7069
name: github-pages
7170
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)