ci(web): composite setup action + lexicons cache + artifact reuse + Next.js cache (#151)
* ci(web): composite setup action, lexicons cache, artifact reuse, Next.js cache
- Extract shared setup into .github/actions/setup composite action
- Cache lexicons build keyed on pnpm-lock.yaml hash, eliminating
redundant clones across 6 jobs
- Accessibility job now downloads build artifact instead of re-running
pnpm build (saves ~2-3 min)
- Add Next.js .next/cache caching for incremental compilation
- Include public/ in build artifact for accessibility job
* fix(ci): add pnpm version to composite action
The web repo doesn't have a packageManager field in package.json, so
pnpm/action-setup needs an explicit version parameter.
* fix(ci): create .next/standalone/.next/ before copying static assets
The downloaded artifact contains .next/standalone/ at the top level but
not the .next/ subdirectory within it. Create it before copying static
assets.
* fix(ci): dereference pnpm symlinks before artifact upload
The Next.js standalone output contains pnpm symlinks in node_modules/
that break when uploaded and downloaded as GitHub Actions artifacts.
Dereference them with `cp -rL` before upload so the accessibility job
gets real files instead of broken symlinks.
Fixes: standalone server crash with "Cannot find module 'styled-jsx'"
* fix(ci): handle broken symlinks before dereferencing standalone
pnpm's .pnpm directory contains broken symlinks that cause cp -rL to
fail. Remove dangling symlinks first with find, then dereference the
valid ones for artifact upload.
* fix(ci): replace artifact reuse with Next.js build cache for accessibility
pnpm's symlinked node_modules in .next/standalone/ cannot survive
GitHub Actions artifact upload/download — broken symlinks cause the
standalone server to crash with missing module errors (styled-jsx).
Instead of artifact transfer, the accessibility job now rebuilds with
the shared Next.js build cache. Same commit = cache hit, so the
rebuild is near-instant while being fully reliable.
authored by