From 5b96fc0c796a42c324035928aade49a4e67ca0b5 Mon Sep 17 00:00:00 2001 From: Christophe Dervieux Date: Thu, 19 Sep 2024 12:14:23 +0200 Subject: [PATCH] Move github action one level in publish doc This match the intro mentioning 3 methods closes quarto-dev/quarto-cli#10802 --- docs/publishing/github-pages.qmd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/publishing/github-pages.qmd b/docs/publishing/github-pages.qmd index d0f1d77019..1e03394214 100644 --- a/docs/publishing/github-pages.qmd +++ b/docs/publishing/github-pages.qmd @@ -117,19 +117,19 @@ Here are all of the available command line options for `quarto publish gh-pages` {{< include _cli-options.md >}} -### GitHub Action +## GitHub Action Using the `quarto publish {{< meta provider >}}` command to publish locally rendered content is the most simple and straightforward way to publish. Another option is to use [GitHub Actions](https://docs.github.com/en/actions) to render and publish your site (you might prefer this if you want execution and/or rendering to be automatically triggered from commits). There are a few different ways to approach rendering and publishing content. Below, we'll provide a how-to guide for publishing with GitHub Actions. For more conceptual background on the various approaches, see the discussion on [Rendering for CI](ci.qmd#rendering-for-ci). -#### Freezing Computations +### Freezing Computations {{< include _freeze-basics.md >}} Note that an alternative approach is to execute the code as part of the GitHub Action. For now we'll keep things simpler by executing code locally and storing the computations by using freeze. Then, further below, we'll cover [Executing Code](#executing-code) within a GitHub Action. -#### Publish Action +### Publish Action Before configuring the publishing action, it's important that you run `quarto publish gh-pages` locally, once. This will create the `_publish.yml` configuration required by the subsequent invocations of the GitHub Action. To do this, run the following from within your project: @@ -173,7 +173,7 @@ Once you've done this, check all of the newly created files (including the `_fre {{< include _github-action-executing-code.md >}} -#### Example: Jupyter with venv +### Example: Jupyter with venv Here is a complete example of a GitHub Action that installs Python, Jupyter, and package dependencies from `requirements.txt`, then executes code and renders output to GitHub Pages: @@ -213,7 +213,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` -#### Example: Knitr with renv +### Example: Knitr with renv Here is a complete example of a GitHub Action that installs R and package dependencies from `renv.lock`, then executes code and renders output to GitHub Pages: @@ -255,7 +255,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` -#### Additional Options +### Additional Options It's possible to have a Quarto project in a larger GitHub repository, where the Quarto project does not reside at the top-level directory. In this case, add a `path` input to the invocation of the `publish` action. For example: