Skip to content

Commit 4c57497

Browse files
committed
Reogarnize content to README
following new feedback on #106
1 parent b6ab166 commit 4c57497

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

publish/README.md

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,31 @@ Give this token a memorable name, and note the resulting string (or keep this wi
3737
- Use [quarto-publish-example.yml](../examples/quarto-publish-example.yml) as an example
3838
- Go over our documentation for additional details at <https://quarto.org/docs/publishing/github-pages.html#github-action>
3939

40-
3. Configure Quarto publish action to use `gh-pages` as publishing target:
40+
### Details on how to configure the GitHub Actions workflow
4141

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:
5043

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
5264

53-
```yaml
54-
permissions:
55-
contents: write
56-
```
5765

5866
## Posit Connect
5967

0 commit comments

Comments
 (0)