Skip to content

initial build of tech doc #242

initial build of tech doc

initial build of tech doc #242

Workflow file for this run

on:
push:
branches:
- master
- brandon_url_changes
name: bookdown
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GH_PAT }}
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Install libcurl
run: |
sudo apt-get install libgdal-dev libcurl4-gnutls-dev libgit2-dev libudunits2-dev
- name: Install Pandoc
#if: ${{ ! github.event.inputs.ghpages }}
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '2.17.1.1'
- name: Cache Renv packages
uses: actions/cache@v1
with:
path: $HOME/.local/share/renv
key: r-${{ hashFiles('renv.lock') }}
restore-keys: r-
- name: Cache bookdown results
uses: actions/cache@v1
with:
path: _bookdown_files
key: bookdown-${{ hashFiles('**/*Rmd') }}
restore-keys: bookdown-
- name: Install packages
run: |
R -e 'install.packages("renv")'
R -e 'renv::restore()'
- name: Build site
run: Rscript -e 'bookdown::render_book("index.Rmd", quiet = TRUE)'
- name: Deploy to gh-pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: _book # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch