geco-bern / agds

Applied Geodata Science book. Developed for the lecture(s) with the same name at the Institute of Geography, University of Bern.
https://geco-bern.github.io/agds/
Other
5 stars 6 forks source link

Deploy book #52

Closed stineb closed 1 year ago

stineb commented 1 year ago

@khufkens could you do this: publish with github pages?

khufkens commented 1 year ago

Done wait on a refresh and check here: https://computationales.github.io/agds/

stineb commented 1 year ago

Great. It's now live here: https://geco-bern.github.io/agds/

stineb commented 1 year ago

Bookdown rendering fails: https://github.com/geco-bern/agds/actions/runs/4165982125

Required packages are missing: ranger

That makes no sense to me. It's on CRAN.

khufkens commented 1 year ago

You never call it explicitly as in library(ranger) in any of the markdowns. Since you have it on your system it is available to YOU but not elsewhere if restoring the system using renv. You need to explicitly load this package into your namespace and then update the renv lock file (locking the packages used) by using renv::snapshot()

Run renv::restore() and then library(ranger) on the console in the project and then run renv::snapshot() to take a new snapshot.

khufkens commented 1 year ago

In the runner here: https://github.com/geco-bern/agds/blob/f0da3e8dd60c4866cba6df75779423e20bdf0d3d/.github/workflows/bookdown.yaml#L30

The script installs the bookdown and renv packages, to then restore the whole system of required packages from the renv lock file. If this is incomplete the process will fail when trying to use these packages.