fix typo in index.qmd #2
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 Book on PR to Main | ||
on: | ||
pull_request_target: | ||
types: [closed] | ||
branches: | ||
- main | ||
jobs: | ||
check-merged: | ||
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'handbook_update') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
build-and-render: | ||
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'handbook_update') | ||
runs-on: ubuntu-latest | ||
needs: [check-merged] # Ensure this runs only after the check-merged job completes | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
with: | ||
tinytex: false | ||
# uncomment and specify version if needed | ||
# version: SPECIFIC-QUARTO-VERSION-HERE | ||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
- name: Restore R package from renv | ||
run: | | ||
install.packages("renv") | ||
renv::restore() | ||
# Rscript -e ' | ||
# if (!requireNamespace("pacman", quietly = TRUE)) install.packages("pacman") | ||
# pacman::p_load( | ||
# "tidyverse", "googlesheets4", "learnr", "swirl", "here", "rio", "openxlsx", | ||
# "pacman", "renv", "remotes", "linelist", "naniar", "janitor", "gtsummary", | ||
# "rstatix", "broom", "lmtest", "easystats", "epicontacts", "EpiNow2", | ||
# "EpiEstim", "projections", "incidence2", "i2extras", "epitrix", "distcrete", | ||
# "cowplot", "RColorBrewer", "ggnewscale", "DiagrammeR", "gghighlight", "ggrepel", | ||
# "plotly", "gganimate", "sf", "tmap", "OpenStreetMap", "spdep", "rmarkdown", | ||
# "reportfactory", "officer", "flexdashboard", "shiny", "knitr", "flextable", | ||
# "ggtree", "ape", "treeio", "babelquarto", "babeldown")' | ||
- name: Render Book | ||
run: Rscript -e 'source("quarto_runfile.R")' | ||
- name: Publish to Netlify (and render) | ||
uses: quarto-dev/quarto-actions/publish@v2 | ||
with: | ||
target: netlify | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||