Skip to content

Commit 2b90fd6

Browse files
committed
Add mention of QUARTO_PROFILE to render with a profile
Related to discussion at #108
1 parent 4c57497 commit 2b90fd6

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

publish/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,17 @@ The `with` parameter can also be set to configure the following
9292

9393
* `path`: Subdirectory containing the quarto project to be published or path to individual .qmd file. Default to working directory (`.`)
9494
* `render`: Set to `render: "false"` to skip rendering of project before publishing. By default, this `publish` action will render to all formats defined.
95+
96+
## Rendering with a Quarto profile
97+
98+
`quarto publish` will render first by default. You can render with a specific profile by setting the `QUARTO_PROFILE` environment variable. For example, to publish the version correspondig with the `preview` profile of your website (i.e. you have a `_quarto-preview.yml` file in your project), you can do:
99+
100+
```yaml
101+
- name: Render Quarto Project
102+
uses: quarto-dev/quarto-actions/render@v2
103+
env:
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions
105+
QUARTO_PROFILE: preview
106+
with:
107+
target: gh-pages
108+
```

render/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,16 @@
99
```
1010
1111
`path:` can be a path to a subdirectory containing the quarto project to be rendered or a path to a single .qmd file
12+
13+
## Rendering with a Quarto profile
14+
15+
You can render with a specific profile by setting the `QUARTO_PROFILE` environment variable. For example, to render with the `preview` profile (i.e. you have a `_quarto-preview.yml` file in your project), you can do:
16+
17+
```yaml
18+
- name: Render Quarto Project
19+
uses: quarto-dev/quarto-actions/render@v2
20+
env:
21+
QUARTO_PROFILE: preview
22+
with:
23+
to: html
24+
```

0 commit comments

Comments
 (0)