Skip to content

01 Build and Deploy Site #37

01 Build and Deploy Site

01 Build and Deploy Site #37

name: "01 Build and Deploy Site"
on:
push:
branches:
- main
- master
schedule:
- cron: '0 0 * * 2'
workflow_dispatch:
inputs:
name:
description: 'Who triggered this build?'
required: true
default: 'Maintainer (via GitHub)'
reset:
description: 'Reset cached markdown files'
required: false
default: false
type: boolean
jobs:
full-build:
name: "Build Full Site"
runs-on: ubuntu-latest
permissions:
checks: write
contents: write
pages: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
RENV_PATHS_ROOT: ~/.local/share/renv/
steps:
- name: "Checkout Lesson"
uses: actions/checkout@v3
with:
repository: 'epiverse-trace/tutorials-middle'
- name: "Set up R"
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: "Set up Pandoc"
uses: r-lib/actions/setup-pandoc@v2
- name: "Setup Lesson Engine"
uses: carpentries/actions/setup-sandpaper@main
with:
cache-version: ${{ secrets.CACHE_VERSION }}
- name: "Setup Package Cache"
uses: carpentries/actions/setup-lesson-deps@main
with:
cache-version: ${{ secrets.CACHE_VERSION }}
- uses: actions/cache@v4
with:
path: site/built
key: md-es
- name: "Build Site"
run: |
renv::install("joelnitta/dovetail")
sandpaper::package_cache_trigger(TRUE)
dovetail::render_trans_from_dir(lang = "es", preview = FALSE)
shell: Rscript {0}
- name: Deploy to GitHub pages 🚀
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: site/docs