Skip to content

Build Site

Build Site #138

on:
push:
branches: main
pull_request:
branches: main
schedule:
# * is a special character in YAML so you have to quote this string
# Trigger once a week, on a Sunday (0)
- cron: '0 0 * * 0'
workflow_dispatch:
name: Build Site
jobs:
build-website:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: quarto-dev/quarto-actions/setup@v2
# - name: Put pandoc in PATH
# run: |
# mkdir -p ~/.local/bin
# ln -s $(dirname $(readlink -f $(which quarto)))"/pandoc" ~/.local/bin/pandoc
# /opt/quarto/bin/tools/pandoc --version
- name: Install pandoc
run: |
DEB=pandoc-2.19.2-1-amd64.deb
wget https://github.com/jgm/pandoc/releases/download/2.19.2/$DEB
sudo dpkg -i $DEB
pandoc --version
shell: bash
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-renv@v2
- name: Build site 🔧
run: Rscript scripts/build_website.R
- name: Deploy 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: website/_site # The folder the action should deploy.