Skip to main content
Lighthouse CI runs automatically on every pull request to preview. It builds the Astro site, runs Lighthouse three times against the homepage and inner page, and reports results as a PR status check.

Configuration

The full configuration is in .lighthouserc.cjs at the monorepo root:

When it runs

Lighthouse CI is triggered by the lighthouse job in .github/workflows/ci.yml, which runs on every PR targeting preview:
continue-on-error: true means a Lighthouse regression does not block a PR merge — it surfaces as a failing status check without preventing the merge. This allows the team to make informed decisions about performance trade-offs.

Performance budget

The project targets the following Lighthouse scores:

Core Web Vitals targets

Asset budget

Why 95+ performance is achievable

The static-first architecture eliminates the main sources of performance overhead:

No framework runtime

Production pages ship zero React, Vue, or Svelte runtime JavaScript. All UI is rendered to static HTML at build time. The only JS is small vanilla event handlers (data-attribute driven, under 50 lines each).

CDN edge serving

Cloudflare serves static HTML from the edge node closest to the visitor. No origin server round-trip for any public page.

Tailwind CSS purge

Tailwind v4’s CSS-first config tree-shakes unused classes at build time. Only classes actually referenced in .astro components survive.

Static image dimensions

All images have explicit width and height attributes, eliminating layout shift (CLS). Sanity’s image pipeline provides LQIP placeholders for above-the-fold images.

Reading Lighthouse results

After CI runs, the Lighthouse job uploads results to temporary public storage and posts a link in the PR status checks. Click Details next to the Lighthouse check to open the full report. If you install the Lighthouse CI GitHub App and set LHCI_GITHUB_APP_TOKEN in the repository secrets, you get inline score annotations directly on the PR diff.

Running Lighthouse locally

To run Lighthouse CI against a local build:
Or use the Lighthouse CLI for a single-run audit: