update course for 2023-2024 #57
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
name: Render and Deploy | |
on: | |
push: | |
pull_request: | |
## If you need to clear the cache, update the number inside cache-version as | |
## discussed at https://github.com/r-lib/actions/issues/86. | |
env: | |
cache-version: 1 | |
jobs: | |
render: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: '4.2' | |
- name: Set up pandoc | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Set up TinyTex | |
uses: r-lib/actions/setup-tinytex@v2 | |
- name: Install X11 dependencies on MacOS | |
if: runner.os == 'macOS' | |
run: | | |
brew install --cask xquartz | |
- name: Install curl Headers | |
if: runner.os == 'linux' | |
run: sudo apt-get install libcurl4-openssl-dev | |
- name: Install magick on Linux | |
if: runner.os == 'linux' | |
run: sudo apt-get -y install libmagick++-dev | |
- name: Install libnetcdf-dev on Linux | |
if: runner.os == 'linux' | |
run: sudo apt-get -y install libnetcdf-dev | |
- name: Set up renv | |
uses: r-lib/actions/setup-renv@v2 | |
with: | |
cache-version: ${{ env.cache-version }} | |
- name: Session info | |
run: | | |
install.packages('sessioninfo') | |
options(width = 100) | |
pkgs <- installed.packages()[, "Package"] | |
sessioninfo::session_info(pkgs, include_base = TRUE) | |
shell: Rscript {0} | |
- name: Render site | |
run: | | |
rmarkdown::render_site() | |
shell: Rscript {0} | |
- name: Deploy 🚀 | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
uses: JamesIves/github-pages-deploy-action@v4.2.5 | |
with: | |
BRANCH: gh-pages | |
FOLDER: _site | |
- name: Upload LaTeX logs | |
if: failure() | |
uses: actions/upload-artifact@main | |
with: | |
name: latex-logs | |
path: | | |
*.log | |
*.tex |