Skip to content

Latest commit

 

History

History

setup

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

setup

Setup a Quarto release (https://github.com/quarto-dev/quarto-cli/releases) using GitHub Actions. This action can be used to install Quarto on all runner OSs, so that quarto will be available from the path.

Usage

This action will:

  • On macOS and Linux:
    • Download a release of Quarto from GitHub and install it
    • use gh to download the latest available bundle, if no version is specified as input. If gh is not available on your Github Action runner, you can specify a fixed version which will be directly downloaded using wget.
    • Install TinyTeX if requested.
  • On Windows:

We recommend using a Linux or MacOS runner if possible, especially if TinyTeX is needed.

Inputs available

  • version - optional. If provided, the specific quarto version will be installed. Ex: version: 1.4.515

      steps:
        - uses: quarto-dev/quarto-actions/setup@v2
          with:
            version: 1.4.515

    If not provided, setup will use the latest released version of quarto.

    If the latest pre-release build is desired, use version: pre-release.

  • tinytex - optional. Set tinytex: true to install TinyTeX using quarto install tool tinytex. Note: Installing TinyTeX on Windows can take several minutes.

      steps:
        - uses: quarto-dev/quarto-actions/setup@v2
          env:
            GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          with:
            tinytex: true

    Setting GH_TOKEN is recommended as installing TinyTeX will query the github API. Otherwise, some API rate limit issue could happen which will make the step fails (e.g. with an explicit 403 - Forbidden error). A re-run of failed job on Github would solve it too.

GitHub Enterprise

For GitHub Enterprise Server (GHES), you may need to generate a personal access token (PAT) on github.com to enable downloading Quarto. GitHub's setup-python action uses a similar workaround, from which these instructions are adapted:

  • Create a PAT on any github.com account by using this link after logging into github.com (not your GHES instance). This PAT does not need any rights, so make sure all the boxes are unchecked.

  • Store this PAT in the repository / organization where you run your workflow, e.g. as GH_GITHUB_COM_TOKEN. You can do this by navigating to your repository -> Settings -> Secrets -> Actions -> New repository secret.

  • In your workflow, incorporate your PAT as an environment variable. For example:

    - name: Set up Quarto
      uses: quarto-dev/quarto-actions/setup@v2
      env:
        GH_TOKEN: ${{ secrets.GH_GITHUB_COM_TOKEN }}

Examples

name: quarto-setup

on: 
  branch: main

jobs:
  quarto-linux:
    runs-on: ubuntu-latest
    steps:
      - uses: quarto-dev/quarto-actions/setup@v2
      - run: |
          quarto --version
  quarto-windows:
    runs-on: windows-latest
    steps:
      - uses: quarto-dev/quarto-actions/setup@v2
      - run: |
          quarto --version
  quarto-macos:
    runs-on: macos-latest
    steps:
      - uses: quarto-dev/quarto-actions/setup@v2
      - run: |
          quarto --version