Skip to content

Render and Publish #246

Render and Publish

Render and Publish #246

Workflow file for this run

on:
schedule:
- cron: "0 0 * * 0,3,5"
push:
branches: main
name: Render and Publish
# you need these permissions to publish to GitHub pages
# permissions:
# contents: write
# pages: write
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.GH_TOKEN }}
# https://jasonraimondi.com/posts/install-google-fonts-in-github-workflow/
- name: Install Google Fonts
run: |
unzip -d Noto_Sans/ _extensions/Noto_Sans.zip
mv Noto_Sans /usr/share/fonts/
fc-cache -fv
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
# To install LaTeX to build PDF book
tinytex: true
# add software dependencies here and any libraries
# From https://github.com/actions/setup-python
- name: Setup Python
uses: actions/setup-python@v5
- run: pip install -r requirements.txt
# From https://github.com/r-lib/actions/tree/v2-branch/setup-r
- name: Install R
uses: r-lib/actions/setup-r@v2
- name: Install ubuntu dependencies
run: |
sudo add-apt-repository ppa:ubuntugis/ppa
sudo add-apt-repository ppa:c2d4u.team/c2d4u4.0+
sudo apt update
sudo apt-get -y install libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libfontconfig1-dev \
libfribidi-dev \
libharfbuzz-dev
sudo apt install libudunits2-dev \
libcurl4-openssl-dev \
libgdal-dev \
gdal-bin \
libproj-dev
sudo apt install r-cran-sf r-cran-rnaturalearthdata r-cran-terra r-cran-tidyverse
pip install plotnine
- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
# See more at https://github.com/quarto-dev/quarto-actions/blob/main/examples/example-03-dependencies.md
# NOTE: If Publishing to GitHub Pages, set the permissions correctly
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
- name: Publish to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # this secret is always available for github actions
run: |
git config --global user.email "[email protected]"
git config --global user.name "Auto Build 151 Site"
quarto publish gh-pages docs --no-render --no-browser