Summary
.github/workflows/preview.yml builds and deploys a Quarto PR preview in a single job, using rossjrw/pr-preview-action. Morrison-Lab/gha ships this as a 4-workflow family instead: preview.yml (read-only build in the PR's own context), preview-deploy.yml (privileged deploy from a workflow_run completion, base-repo context), check-equation-renders.yml (headless-browser MathJax check on the same artifact), and cleanup-pr-previews.yml (scheduled housekeeping that removes closed PRs' preview directories — this repo's current bespoke workflow never cleans those up).
Why the build/deploy split matters here
gha's README calls this a deliberate trust boundary: untrusted fork code only runs in the read-only build half, and the privileged gh-pages push happens separately in base-repo context. This repo's current single-job preview.yml runs render and deploy together in the PR's own context, which is exactly the shape that doesn't work for fork PRs (see #90) — rossjrw/pr-preview-action's own docs already note the fork-token limitation this repo's preview.yml comment references.
What to do
- Read gha's README "PR previews (
preview family)" section in full: it's 4 cooperating workflows and the workflow_run wiring (the deploy/equation-check stubs' workflows: value must match the build stub's name: exactly).
- Diff this repo's current
preview.yml step-by-step against preview.yml@v2: confirm the source-dir: ./docs/ output path, tinytex: true, and the existing "listing references a missing file" render-failure check all have equivalents (or decide they're no longer needed).
- Install all four stubs from gha's
examples/, not just the build half.
- Since
workflow_run/schedule triggers only fire from the default-branch copy, this migration doesn't take effect until merged to main — plan the PR accordingly (a preview of the preview workflow itself won't demonstrate the new behavior).
Scope
Filed as a tracking issue only, not implementing yet. Related to #90 (fork-PR previews may specifically benefit from the trust-boundary split) but not a duplicate — that issue is about the Claude review path, this one is about the preview build/deploy path.
Summary
.github/workflows/preview.ymlbuilds and deploys a Quarto PR preview in a single job, usingrossjrw/pr-preview-action. Morrison-Lab/gha ships this as a 4-workflow family instead:preview.yml(read-only build in the PR's own context),preview-deploy.yml(privileged deploy from aworkflow_runcompletion, base-repo context),check-equation-renders.yml(headless-browser MathJax check on the same artifact), andcleanup-pr-previews.yml(scheduled housekeeping that removes closed PRs' preview directories — this repo's current bespoke workflow never cleans those up).Why the build/deploy split matters here
gha's README calls this a deliberate trust boundary: untrusted fork code only runs in the read-only build half, and the privileged
gh-pagespush happens separately in base-repo context. This repo's current single-jobpreview.ymlruns render and deploy together in the PR's own context, which is exactly the shape that doesn't work for fork PRs (see #90) —rossjrw/pr-preview-action's own docs already note the fork-token limitation this repo'spreview.ymlcomment references.What to do
previewfamily)" section in full: it's 4 cooperating workflows and theworkflow_runwiring (the deploy/equation-check stubs'workflows:value must match the build stub'sname:exactly).preview.ymlstep-by-step againstpreview.yml@v2: confirm thesource-dir: ./docs/output path,tinytex: true, and the existing "listing references a missing file" render-failure check all have equivalents (or decide they're no longer needed).examples/, not just the build half.workflow_run/scheduletriggers only fire from the default-branch copy, this migration doesn't take effect until merged tomain— plan the PR accordingly (a preview of the preview workflow itself won't demonstrate the new behavior).Scope
Filed as a tracking issue only, not implementing yet. Related to #90 (fork-PR previews may specifically benefit from the trust-boundary split) but not a duplicate — that issue is about the Claude review path, this one is about the preview build/deploy path.