Checks
What runs on every pull request besides the preview, and what to do when one of them goes red.
Visual regression
The visual job opens every page on the preview and on production in
Playwright, takes full-page screenshots at a fixed viewport and compares them with
pixelmatch (tests/visual.spec.mjs).
There are no stored baseline images: production is the baseline.
- A pull request that changes how a page looks fails it on purpose.
Look at the
visual-diffsartifact (preview, production and diff images), and if the change is what you wanted, merge anyway. - The page list is explicit, and includes a missing page so the 404 is compared too.
- Parts that differ on every load (dates, live data) are masked by selector rather than by raising the tolerance. For pages that render live API data, fetch each response once and replay it to both sides, and freeze the clock.
Variant, not used here: on a site where pull requests are mostly content edits, run the comparison only when the toolchain changes (templates, styles, dependencies), since content edits change pages on purpose.
Lighthouse
The lighthouse job runs Lighthouse on the preview's home page and writes the
scores into that deploy's preview comment, with two links:
- the job summary on GitHub, with the scores, the main speed metrics and every audit below 90, per category (lighthouse-summary.jq);
- the full HTML report, uploaded as a single unzipped file.
Details that make the numbers usable:
- Mobile, Lighthouse's default. Three runs; the run with the median performance score is reported, because a single run's performance score can swing by 50 points on a CI runner.
- The
is-crawlableaudit is skipped: previews arenoindexon purpose, and it would cost a third of the SEO score on every pull request. - Informational only: no thresholds, it never blocks a merge. Compare pull requests with each other; CI runners score performance lower than a laptop.
Link checker
link-checker.yml runs lychee over the published folder on pull requests, every Monday and by hand. Links that cannot work by design (this site links to a missing page on purpose) and sites that block CI runners are excluded, each with a comment saying why. Links to private repositories always fail: they look like 404s from outside.
Claude code review
claude-code-review.yml reviews every pull request automatically, and
claude.yml answers @claude mentions in issues and pull requests.
Both need the secret CLAUDE_CODE_OAUTH_TOKEN, set up with
/install-github-app in Claude Code.