You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: publish/README.md
+22-14Lines changed: 22 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -37,23 +37,31 @@ Give this token a memorable name, and note the resulting string (or keep this wi
37
37
- Use [quarto-publish-example.yml](../examples/quarto-publish-example.yml) as an example
38
38
- Go over our documentation for additional details at <https://quarto.org/docs/publishing/github-pages.html#github-action>
39
39
40
-
3. Configure Quarto publish action to use `gh-pages` as publishing target:
40
+
### Details on how to configure the GitHub Actions workflow
41
41
42
-
```yaml
43
-
- name: Publish to GitHub Pages (and render)
44
-
uses: quarto-dev/quarto-actions/publish@v2
45
-
with:
46
-
target: gh-pages
47
-
env:
48
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions
49
-
```
42
+
When using `quarto-dev/quarto-actions/publish`, configure it to use `gh-pages` as publishing target:
50
43
51
-
4. Configure the minimum required access for the `publish` action to function (see also [quarto-publish-example.yml](../examples/quarto-publish-example.yml)). Add these two lines below and on the same level of indentation as `runs-on:`:
44
+
```yaml
45
+
- name: Publish to GitHub Pages (and render)
46
+
uses: quarto-dev/quarto-actions/publish@v2
47
+
with:
48
+
target: gh-pages
49
+
env:
50
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions
51
+
```
52
+
53
+
If you not using [quarto-publish-example.yml](../examples/quarto-publish-example.yml), check the minimum required access for the `publish` action: You need to set `contents` permissions to `write`.
54
+
55
+
```yaml
56
+
permissions:
57
+
contents: write
58
+
```
59
+
60
+
See Github's documentation on `permissions` for more details
61
+
- Setting permissions for a workflow: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
62
+
- Setting permissions for a workflow job: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions
63
+
- About `GITHUB_TOKEN` permissions: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
0 commit comments