Skip to content

landweb-manual

landweb-manual #59

## Workflow based on from https://github.com/r-lib/actions/tree/v2/examples/bookdown.yaml
name: landweb-manual
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: false
jobs:
build-manual-site:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_CONFIG_MRAN_ENABLED: false
RENV_CONFIG_PAK_ENABLED: false
RENV_PATHS_ROOT: ~/.cache/R/renv
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-tinytex@v2
- uses: PredictiveEcology/actions/install-spatial-deps@v0.2
- name: Install additional system dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update -y
sudo apt-get install -y \
libarchive-dev \
libmagick++-dev
- uses: r-lib/actions/setup-r@v2
with:
extra-repositories: 'https://predictiveecology.r-universe.dev/'
Ncpus: 2
r-version: 4.2.3
use-public-rspm: false
- uses: r-lib/actions/setup-renv@v2
# with:
# profile: '"manual"'
- name: Cache bookdown results
uses: actions/cache@v4
with:
path: manual/_bookdown_files
key: bookdown-${{ hashFiles('**/*Rmd') }}
restore-keys: bookdown-
- name: Build LandWeb manual
run: |
source("manual/build.R")
shell: Rscript {0}
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: false
branch: gh-pages
folder: docs