Skip to content

Commit

Permalink
Move github action one level in publish doc
Browse files Browse the repository at this point in the history
This match the intro mentioning 3 methods

closes quarto-dev/quarto-cli#10802
  • Loading branch information
cderv committed Sep 19, 2024
1 parent 8b67e49 commit 5b96fc0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/publishing/github-pages.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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:

Expand Down

0 comments on commit 5b96fc0

Please sign in to comment.