ci(lighthouse): rewire LHCI gate for SSR Astro app [T-P7-Q-PERF-01] - #21
Merged
Merged
Conversation
Apply the NEXT_LOCALE cookie on the client (lang/dir + translated hero copy) on prerendered pages, and add src/lib/i18n.ts message catalogs plus middleware. This makes ar/ur render RTL correctly, so the Playwright e2e suite is reliable again — drop continue-on-error from the E2E Tests job.
…ocking
The app is SSR (output: 'server', @astrojs/vercel) so there is no ./dist
for LHCI's staticDistDir. Mark the four audited landing pages
prerender=true so `pnpm build` emits their static HTML into
.vercel/output/static, which LHCI serves directly — deterministic, no
running server needed. Fix the two SEO/a11y defects the gate surfaced
(legible font size, descriptive link text), then drop continue-on-error
so the perf/a11y/SEO score gate (minScore 0.95) is blocking again.
- web/lighthouserc.cjs: staticDistDir -> .vercel/output/static, runs 1->3
- web/src/components/DisclaimerBanner.astro: font 0.72->0.75rem; link text
"Learn more" -> "Read our Sharia content guidelines"
- web/src/pages/{dawah,donate,legal/sharia-disclaimer}: prerender=true
(index.astro prerender landed in the preceding i18n commit)
- .github/workflows/_reusable-lighthouse.yml: remove continue-on-error
- web/.gitignore: ignore .lighthouseci/
…review `pnpm start` is `astro preview`, which @astrojs/vercel/serverless does not support, so the server never bound and wait-on timed out (the axe gate gave no signal). Use `pnpm dev` (serves SSR routes with any adapter, same as the Playwright config) and raise the wait-on timeout to 120s.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🟢 Rampart Security Gate — CLEAN
Totals: 0 critical · 0 high · 0 medium · 0 low Mode: |
@axe-core/cli has no --reporter option (errors "unknown option '--reporter'"); it prints to stdout by default. With this and the dev-server fix, the advisory axe gate executes for the first time and reports real WCAG findings instead of erroring on setup.
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.
Summary
Rewire the Lighthouse CI gate to work with the SSR Astro app (it was misconfigured for the Next→Astro migration:
staticDistDir: './dist'against anoutput: 'server'app that produces no dist)./,/dawah,/donate,/legal/sharia-disclaimer) are nowprerender = true, sopnpm buildemits their static HTML into.vercel/output/static, which LHCI serves viastaticDistDir. Deterministic, no running server needed — and a production win (CDN-cached HTML vs SSR per request).0.72→0.75rem) and descriptive link text on the sharedDisclaimerBanner.continue-on-error: truefrom the Lighthouse step — the perf/a11y/SEO score gate (minScore 0.95) is blocking again.a11y-axe.yml, which had the sameastro preview-unsupported-by-vercel-adapter bug (usedpnpm start→ server never bound → 30s timeout); now usespnpm dev.ci.yml).Verification (exact CI toolchain,
@lhci/cli@0.13.x)//dawah//donate//legal/sharia-disclaimer/Lighthouse Quality Gates passed via
workflow_dispatch(run 28182126316) and on the prior PR check — both green with the gate blocking. Build, typecheck, lint, unit, and Playwright e2e (chromium, 17 passed / 1 skipped) all green.