Skip to content

Commit

Permalink
Add mention of QUARTO_PROFILE to render with a profile
Browse files Browse the repository at this point in the history
Related to discussion at #108
  • Loading branch information
cderv committed Jul 2, 2024
1 parent 4c57497 commit 2b90fd6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
14 changes: 14 additions & 0 deletions publish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,17 @@ The `with` parameter can also be set to configure the following

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

## Rendering with a Quarto profile

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

```yaml
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # this secret is always available for github actions
QUARTO_PROFILE: preview
with:
target: gh-pages
```
13 changes: 13 additions & 0 deletions render/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@
```
`path:` can be a path to a subdirectory containing the quarto project to be rendered or a path to a single .qmd file

## Rendering with a Quarto profile

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:

```yaml
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
env:
QUARTO_PROFILE: preview
with:
to: html
```

0 comments on commit 2b90fd6

Please sign in to comment.