fix: install playwright chromium before the prerender build step #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/ci-prerender-playwright"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The frontend CI job runs 'bun run build' (tsc -b && vite build && node scripts/prerender.js), and prerender.js launches Chromium via Playwright to prerender the homepage. That job only ran 'bun install' and never installed Playwright's browser binaries — only the separate e2e job did that, which doesn't help the frontend job. Result: 'Failed to prerender: browserType.launch: Executable doesn't exist at .../chromium_headless_shell-1217/...'.
Fix: add a Chromium install step to the frontend job in both .github/workflows/ci.yml (cached, matching the e2e job's pattern but with its own cache key to avoid colliding with e2e's full multi-browser cache) and .forgejo/workflows/ci.yml (uncached, matching that file's existing convention since it has no cache server).
Verified locally: 'bun run build' completes successfully end-to-end (prerender included) once chromium is installed.