Skip to content

Commit 1fef84f

Browse files
committed
Update documentation following discussion quarto-dev/quarto-cli#439
1 parent bc6e3c5 commit 1fef84f

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

examples/example-04-other-workflows.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,13 @@ If you need to render your project in a GitHub Action, but will use the output f
77
```yaml
88
- name: Render Quarto Project
99
uses: quarto-dev/quarto-actions/render@v2
10-
```
10+
```
11+
12+
Use also this action if you need to render to a specific format that you want to publish (`quarto publish` will render to all format before publishing unless `--no-render` is passed).
13+
14+
```yaml
15+
- name: Render Quarto Project
16+
uses: quarto-dev/quarto-actions/render@v2
17+
with:
18+
to: html
19+
```

examples/example-06-no-render.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,24 @@ to the `publish` action:
1313
render: false
1414
```
1515
16+
## Chaining render then publish
17+
18+
By default, `quarto publish` will render to all format defined before publishing.
19+
If you need to customize the rendering step, e.g only render one format in CI before publishing, use a two step process:
20+
21+
* `quarto render` by providing the targer output format
22+
* `quarto publish --no-render` to skip re-rendering before publishing
23+
24+
```yaml
25+
- name: Render Book project
26+
uses: quarto-dev/quarto-actions/render@v2
27+
with:
28+
to: html
29+
30+
- name: Publish HTML book
31+
uses: quarto-dev/quarto-actions/publish@v2
32+
with:
33+
target: gh-pages
34+
render: false
35+
path: ${{ env.QUARTO_OUTPUT }} # define this env var if you are using a non default output-dir
36+
```

publish/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,9 @@ Give this token a memorable name, and note the resulting string (or keep this wi
5555
CONNECT_API_KEY: ${{ secrets.CONNECT_API_KEY }}
5656
```
5757

58+
## Other configurations
5859

60+
The `with` parameter can also be set to configure the following
5961

62+
* `path`: Subdirectory containing the quarto project to be published. Default to working directory (`.`)
63+
* `render`: Set to `render: "false"` to skip rendering of project before publishing. By default, this `publish` action will render to all formats defined.

render/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Usage
2+
3+
```yaml
4+
- name: Render Quarto Project
5+
uses: quarto-dev/quarto-actions/render@v2
6+
with:
7+
to: html # If set, it will be equivalent to `quarto render --to html`
8+
path: source-folder # By default, the current working dir is used i.e `quarto render .`
9+
```

0 commit comments

Comments
 (0)