Skip to content

Commit 9584000

Browse files
authored
docs: suggest right permissions for write access (#159)
1 parent 0df668f commit 9584000

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

docs/examples.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ jobs:
7777
main:
7878
name: Build, Validate and Deploy
7979
runs-on: ubuntu-20.04
80+
permissions:
81+
contents: write
8082
steps:
8183
- uses: actions/checkout@v3
8284
- uses: w3c/spec-prod@v2
@@ -98,6 +100,8 @@ jobs:
98100
main:
99101
name: Deploy to GitHub pages
100102
runs-on: ubuntu-20.04
103+
permissions:
104+
contents: write
101105
steps:
102106
- uses: actions/checkout@v3
103107
- uses: w3c/spec-prod@v2
@@ -174,6 +178,8 @@ jobs:
174178
main:
175179
name: Build, Validate and Deploy
176180
runs-on: ubuntu-20.04
181+
permissions:
182+
contents: write
177183
strategy:
178184
max-parallel: 1
179185
matrix:
@@ -220,6 +226,8 @@ jobs:
220226
main:
221227
name: Build, Validate and Deploy
222228
runs-on: ubuntu-20.04
229+
permissions:
230+
contents: write
223231
steps:
224232
- uses: actions/checkout@v3
225233
- uses: w3c/spec-prod@v2
@@ -243,6 +251,8 @@ jobs:
243251
main:
244252
name: Build, Validate and Deploy
245253
runs-on: ubuntu-20.04
254+
permissions:
255+
contents: write
246256
steps:
247257
- uses: actions/checkout@v3
248258
- uses: w3c/spec-prod@v2

docs/options.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ Whether or not to validate markup using the [Nu Html Checker](https://github.com
131131
## `GH_PAGES_BRANCH`
132132

133133
Whether or not to deploy to GitHub pages. Set to a Falsy value to not deploy, or provide a Git branch name to push to. You would need to enable GitHub pages publish source in repository settings manually.
134+
When this option is set, you need to ensure that the `GITHUB_TOKEN` for the job running spec-prod has [`write` access to the `contents` scope](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token).
134135

135136
**Possible values:**: None, or a git branch name.
136137

0 commit comments

Comments
 (0)