Skip to content

Merge branch 'main' of github.com:inrae/diades.atlas #203

Merge branch 'main' of github.com:inrae/diades.atlas

Merge branch 'main' of github.com:inrae/diades.atlas #203

on:
push:
branches:
- main
- master
- dev
- test-docker-ci
- up-schema-prod
name: pkgdown-docker-renv
jobs:
pkgdown-docker-renv:
runs-on: ubuntu-latest
container: rocker/geospatial:4.3.0
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_PATHS_ROOT: ~/.local/share/renv
steps:
- uses: actions/checkout@v2
- name: Install universe
run: |
sudo apt-get update
sudo apt install -y software-properties-common
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
sudo apt-get update
- uses: r-lib/actions/setup-pandoc@v2
- name: Cache packages
uses: actions/cache@v1
with:
path: ${{ env.RENV_PATHS_ROOT }}
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
# - uses: r-lib/actions/setup-r@v1
# with:
# use-public-rspm: true
#
# - uses: r-lib/actions/setup-r-dependencies@v1
# with:
# extra-packages: pkgdown
# needs: website
- name: Install system dependencies Linux
run: sudo apt-get update -qq && apt install -y libharfbuzz-dev libfribidi-dev libgit2-dev
- name: Restore packages
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
if (!requireNamespace("pkgdown", quietly = TRUE)) renv::install("pkgdown")
if (!requireNamespace("pkgload", quietly = TRUE)) renv::install("pkgload")
if (!requireNamespace("remotes", quietly = TRUE)) renv::install("remotes")
if (!requireNamespace("thinkrtemplate", quietly = TRUE)) remotes::install_github("ThinkR-open/thinkrtemplate")
# - name: Install package
# run: R CMD INSTALL .
- name: Deploy package
run: |
echo `pwd`
git config --global --add safe.directory /__w/diades.atlas/diades.atlas
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
Rscript -e 'pkgload::load_all();pkgdown::deploy_to_branch(new_process = FALSE)'