Skip to content

add historic cumul burn map #5

add historic cumul burn map

add historic cumul burn map #5

on:
pull_request:
branches:
- main
- development
push:
branches:
- main
- development
paths:
- .github/workflows/render-module-rmd.yaml
- burnSummaries.Rmd
- burnSummaries.R
name: Render module Rmd
jobs:
render:
if: "!contains(github.event.commits[0].message, '[skip-ci]')"
name: Render module Rmd
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install additional system dependencies
run: |
sudo apt-get install -y \
libcurl4-openssl-dev \
libgdal-dev \
libgeos-dev \
libgit2-dev \
libglpk-dev \
libmagick++-dev \
libproj-dev \
libudunits2-dev \
libxml2-dev \
python3-gdal
- name: Install remotes, knitr, rmarkdown, bookdown
run: |
install.packages("remotes")
remotes::install_cran("rmarkdown")
remotes::install_cran("knitr")
remotes::install_cran("bookdown")
shell: Rscript {0}
- name: Install SpaDES packages
run: |
install.packages("SpaDES", dependencies = TRUE)
remotes::install_github("PredictiveEcology/SpaDES.docs@development")
shell: Rscript {0}
- name: Install module package dependencies
run: |
pkgs <- SpaDES.core::packages(modules = "burnSummaries", paths = "..")
Require::Require(pkgs)
shell: Rscript {0}
- name: Render module Rmd
run: |
rmarkdown::render("burnSummaries.Rmd", encoding = "UTF-8")
shell: Rscript {0}
- name: Commit results
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions"
git commit burnSummaries.html -m 'Re-build burnSummaries.Rmd' || echo "No changes to commit"
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:${{github.ref}} || echo "No changes to commit"