diff --git a/publish/README.md b/publish/README.md index e531565..f1dbc1c 100644 --- a/publish/README.md +++ b/publish/README.md @@ -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 +``` \ No newline at end of file diff --git a/render/README.md b/render/README.md index ea223e9..3b95de7 100644 --- a/render/README.md +++ b/render/README.md @@ -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 +```