Update bookdown #93
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: Create and populate .Renviron file | |
run: | | |
echo ARCGIS_CLIENT="$MAPPED_ARCGIS_CLIENT" >> ~/.Renviron | |
echo ARCGIS_SECRET="$MAPPED_ARCGIS_SECRET" >> ~/.Renviron | |
shell: bash | |
env: | |
MAPPED_ARCGIS_CLIENT: ${{ secrets.ARCGIS_CLIENT }} | |
MAPPED_ARCGIS_SECRET: ${{ secrets.ARCGIS_SECRET }} | |
- 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 arcgis dependencies | |
run: | | |
install.packages(c("cli", "dbplyr", "DT", "here", "httr2", "RcppSimdJson", "rlang", "rvest", "sf")) | |
shell: Rscript {0} | |
- name: Install arcgis | |
run: | | |
install.packages("arcgis", repos = c("https://r-arcgis.r-universe.dev", "https://cloud.r-project.org")) | |
shell: Rscript {0} | |
- name: Install bookdown | |
run: | | |
install.packages(c("bookdown", "downlit", "xml2", "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 |