Setup Quarto on Github Actions doesn't seem to install everything needed?

Hi all,

I'm certainly missing something obvious, but I'm trying to render a Quarto book on github actions and it's not working because of some missing dependency (but somehow it worked yesterday? But not anymore!). Anyways, here's the workflow file: rap4all/quarto-publish.yml at master · b-rodrigues/rap4all · GitHub (copied straight from the documentation) and here's the error message I get:

Run quarto-dev/quarto-actions/publish@v2
Run git config --global ""
 * branch            gh-pages   -> FETCH_HEAD
 * [new branch]      gh-pages   -> origin/gh-pages
Rendering for publish:

[ 1/12] index.qmd
[ 2/12] intro.qmd
[ 3/12] fprog.qmd
Error in loadNamespace(x) : there is no package called ‘jsonlite’
Calls: .main ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted

R installation:
  Version: 4.2.2
  Path: /usr/lib/R
    - /usr/local/lib/R/site-library
    - /usr/lib/R/site-library
    - /usr/lib/R/library
  rmarkdown: (None)

The rmarkdown package is not available in this R installation.
Install with install.packages("rmarkdown")

Error: Process completed with exit code 1.

So somehow it seems that the "Setup Quarto" actions does not install everything needed? Also, in the Qmd file that throws the error, no packages at all get loaded in the code chunks. For now, I'm using simply base R capabilities.

Thanks in advance for the help


1 Like

So it turns out that indeed, I was missing something obvious!

I needed to add the following action to my workflows file:

- uses: r-lib/actions/setup-r-dependencies@v2

which installs the right dependencies. Thanks to @ajordannafa for his help!

Sorry for the delay on this one

Quarto actions on itself will only handle installing quarto and optionally TinyTeX. For anything else related to the document content, one should setup the needed steps. We provide some quick guidance though to help

We also have an article about rendering on CI in the website

Having rendering step happening in the CI is not the first option with quarto (considering the freeze option) and that is also why quarto actions only does not do everything for every computation language.

If doc is not clear enough or information hard to find, please to send us feedback so that we improve!

Thank you !

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.