Skip to content

Merge pull request #18 from CeresBarros/16-update-module-author-infom… #30

Merge pull request #18 from CeresBarros/16-update-module-author-infom…

Merge pull request #18 from CeresBarros/16-update-module-author-infom… #30

on:
push:
branches:
- master
- development
pull_request:
branches:
- master
- development
name: Render bookdown website
jobs:
bookdown:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: PredictiveEcology/actions/install-spatial-deps@main
- uses: r-lib/actions/setup-r@v2
with:
Ncpus: 2
use-public-rspm: false
- uses: r-lib/actions/setup-pandoc@v2
- name: Install TinyTeX
uses: r-lib/actions/setup-tinytex@v2
env:
# install full prebuilt version
TINYTEX_INSTALLER: TinyTeX
- name: Install package dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
packages: |
any::rcmdcheck
any::rmarkdown
any::bookdown
any::htmlwidgets
- name: Render Bookdown
run: |
source(".github/workflows/render.R", echo = TRUE)
shell: Rscript {0}
- uses: actions/upload-artifact@v2
with:
name: docs
path: docs/
checkout-and-deploy:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"
runs-on: ubuntu-20.04
needs: bookdown
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifact
uses: actions/download-artifact@v2
with:
# Artifact name
name: docs # optional
# Destination path
path: docs/ # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
build_dir: docs/
branch: gh-pages