script to add ecomon survey strata to arcgis.com #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build bookdown | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
name: build-book | |
jobs: | |
build-book: | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install R pkg linux dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install libcurl4-openssl-dev libnetcdf-dev libudunits2-dev libgdal-dev libharfbuzz-dev libfribidi-dev | |
shell: bash | |
- name: Install bookdown | |
run: | | |
install.packages(c("bookdown", "downlit", "xml2", "sf", "leaflet", "purrr", "knitr")) | |
shell: Rscript {0} | |
- name: Build book | |
run: | | |
setwd("bookdown") | |
bookdown::render_book("index.Rmd", "all") | |
shell: Rscript {0} | |
- name: Deploy to gh-pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
BRANCH: gh-pages | |
FOLDER: bookdown/_book | |
CLEAN: true |