Render on PRs before merging, and drop the figure from Projects - #4
Merged
Conversation
figures/logos are for publications only; projects page is text-only Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mFiYv4seQ8Hyar7anXMFR
publish.yml only ran on push to main, so nothing verified a change until it was already live. - add pull_request trigger; deploy job gated on event_name != pull_request - move pages:write/id-token:write to the deploy job so PR runs don't hold publish credentials - concurrency scoped per-ref so PR checks don't queue behind main deploys - check-site.sh asserts nav pages exist, the /software.html alias stub still emits, required assets ship, and cv.html hasn't regressed to raw.githubusercontent (quarto render exits 0 for all of these) - check-links.py resolves every internal href/src against disk Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mFiYv4seQ8Hyar7anXMFR
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes. The CI one is the substance; the figure removal rode along.
Render on PRs
publish.ymlonly triggered on push tomain, so nothing verified a change until it was already live on the site. Now:pull_requesttrigger added. Thebuildjob runs on every PR, so a render failure blocks the merge instead of breaking production.deployis gated ongithub.event_name != 'pull_request'. PRs build and check; they never publish.deployjob.pages: write/id-token: writewere workflow-wide, which meant PR runs held publish permissions they had no use for.pages-${{ github.ref }}), so a PR check can't queue behind a deploy ofmain. Superseded PR pushes cancel themselves; deploys never do.This extends the existing workflow rather than adding a second one. A separate PR-only workflow would duplicate the build steps, and the two would drift — the moment a
setup-pythonstep gets added for executable blog posts, a duplicated check would stop representing what actually deploys.Two checks on the rendered output
quarto renderexits 0 for plenty of broken-but-valid sites, so the render alone isn't much of a gate. Both scripts live in.github/scripts/so they can be run locally against a_sitetoo.check-site.shasserts the things that have actually gone wrong in this repo:_site/software.htmlstill emits its redirect stub — that comes from onealiases:line inprojects.qmd, and deleting it renders fine while silently 404ing every existing link to the old Software pagecv.pdf, the figure, the profile photo)cv.htmlhasn't regressed toraw.githubusercontent, which serves PDFs asapplication/octet-streamwithnosniffand renders the inline embed as a blank boxcheck-links.pyresolves every internalhref/srcin the rendered HTML against disk. The usual way to break a content site is a link, not a render error — a.qmdextension that should have been.html, a renamed page, an image moved out offiles/. Quarto renders all of those without complaint. External URLs are not checked.Figure removed from Projects
Figures belong on the publications page; the projects page is text-only. The SVG is unchanged and still used as the 2026 entry's thumbnail.
Verification
Rendered locally with Quarto 1.10.18 from a clean
_site. Both checks pass (152 internal links across 7 pages, no breaks). I also confirmed they fail correctly — a check that can't fail is worthless — by deletingprojects.html, deleting thesoftware.htmlredirect, pointingcv.htmlback atraw.githubusercontent, and rewriting a link to./projects.qmd. Each exits 1 with the specific reason.The real test is this PR:
buildshould run anddeployshould be skipped.🤖 Generated with Claude Code
https://claude.ai/code/session_011mFiYv4seQ8Hyar7anXMFR