Skip to content

Quarto Check Equation Renders #404

Quarto Check Equation Renders

Quarto Check Equation Renders #404

# Fourth leg of the PR-preview family, delegated to the reusable workflow in
# Morrison-Lab/gha. Triggered when the build workflow finishes, it downloads the
# build artifact and crawls it with a headless browser to catch equations
# MathJax can't render -- invisible in the Quarto/pandoc build log, since
# MathJax only typesets client-side (see d-morrison/rme#972).
#
# NOTE: the `workflows:` value below MUST match the `name:` of the build
# workflow (preview.yml). `workflow_run` triggers only fire when this file
# lives on the default branch.
name: Quarto Check Equation Renders
#
# `workflow_run` is deliberate here, and the split it enables is what makes
# fork PR previews safe rather than unsafe. Morrison-Lab/gha's preview family
# builds in the (possibly fork) PR context with `contents: read` and no
# secrets, then deploys from the base-repo context on `workflow_run`. Merging
# the two halves into one `pull_request_target` job is the pattern zizmor's
# warning is really aimed at, and is what this design exists to avoid.
on: # zizmor: ignore[dangerous-triggers]
workflow_run:
workflows: ["Quarto Preview Build"]
types: [completed]
jobs:
check:
permissions:
contents: read
actions: read # needed to download the build artifact
uses: Morrison-Lab/gha/.github/workflows/check-equation-renders.yml@v2