cambiotraining / quarto-course-template

https://cambiotraining.github.io/quarto-course-template/
Other
1 stars 1 forks source link

Github action issue with executable files #11

Open tavareshugo opened 1 year ago

tavareshugo commented 1 year ago

In the experimental-design course there were several errors with the render action (example and transcript below).

[1/5] index.md
[2/5] setup.md
[3/5] materials/01-operationalisation.rmd
Error in loadNamespace(x) : there is no package called ‘jsonlite’
Calls: .main ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
WARNING: Unable to perform code-link (code-link requires R packages rmarkdown, downlit, and xml2)
[4/5] materials/02-replication.rmd
Error in loadNamespace(x) : there is no package called ‘jsonlite’
Calls: .main ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
WARNING: Unable to perform code-link (code-link requires R packages rmarkdown, downlit, and xml2)
[5/5] materials/03-case-study.rmd
Error in loadNamespace(x) : there is no package called ‘jsonlite’
Calls: .main ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted

R installation:
  Version: 4.3.0
  Path: /usr/lib/R
  LibPaths:
    - /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")

We fixed this by adding installation of R and rmarkdown to the action. However, this slows the action substantially. I thought that the point of having the _freeze directory is that it would not require the action to execute the docs... Need to investigate this.

tavareshugo commented 1 year ago

I wonder if setting freeze: true will stop this from happening. At the moment it's freeze: auto, but maybe that sometimes still triggers the render.