Newer
Older
- pkgdown
- bookdown
- deploy
default:
tags: [stable]
image: rocker/geospatial:4.3.1
variables:
CI_CACHE_DIR: "$CI_PROJECT_DIR/ci"
R_LIBS_USER: "$CI_CACHE_DIR/lib"
PKG_DATA_CACHE: "$CI_CACHE_DIR/data"
cache:
key:
paths:
- $CI_CACHE_DIR
before_script:
- mkdir -p $R_LIBS_USER
- echo "R_LIBS='$R_LIBS_USER'" > .Renviron
- R -q -e 'if (!require(remotes)) install.packages(c("remotes", "testthat"))'
- R -q -e 'devtools::install_deps(dependencies = TRUE)'
- R -q -e 'remotes::install_git("https://forgemia.inra.fr/umr-g-eau/fairify.git")'
check:
variables:
NOT_CRAN: "true"
stage: checks
script:
- R -q -e 'remotes::update_packages("rcmdcheck")'
- R -q -e 'rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")'
- R -q -e 'devtools::install()'
pkgdown:
stage: pkgdown
script:
- R -q -e 'remotes::update_packages("pkgdown")'
- R -q -e 'rmarkdown::render("README.rmd", "md_document")'
- R -q -e 'fairify::build_site()'
- mv docs/* public/
artifacts:
paths:
- public/
bookdown:
stage: bookdown
dependencies:
- pkgdown
script:
- ls reports/
- mv reports/* public/