ci: build the web app in CI, on the runner with memory for it #576
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
gmackie/ForgeGraph!576
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ci/web-build-job"
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?
Nothing in CI compiled
apps/webfor production. CI runs typecheck, lint, unit tests and the Storybook build — and all of them passed on #564, whosenext buildcouldn't resolve its own imports. Main then sat undeployable until the deploy itself hit the error (fixed in #575).This adds a
web-buildjob that runspnpm --filter @forgegraph/web build. That's the same script the deploy runs: it copies the tree-sitter wasms, then runsnext build --webpack.Why it runs on
heavy, not hetzner-workerI measured the build locally at
4d71a6a8's fix (fresh install):NODE_OPTIONS)JavaScript heap out of memoryhetzner-worker runs each job in a 3 GB container (
--memory 3g), so the passing build would be OOM-killed there. hetzner-bob (heavy) gives each job 5 GB on a 15.6 GB box with ~11.5 GB free. The step overridesNODE_OPTIONSto 3072; every other job and the workflow-wide cap are unchanged.It's a separate job for the same reason
storybookis: stacking a production build on thecijob's typecheck is what pushes a small runner into swap.Trade-offs
Correction to the original description: it said this moves a job onto hetzner-bob, "which ForgeGraph CI otherwise avoids". That was wrong. hetzner-bob also advertises
forgegraph-worker, so the existinggitleaks,storybookandcijobs (runs-on: [forgegraph-ci, forgegraph-worker]) can already land there. The header comment inci.ymlclaimingforgegraph-workerrestricts jobs to hetzner-worker is stale for the same reason. This job's routing is still right:heavyexists only on hetzner-bob, which is what guarantees the 5 GB container.This PR's own CI run is the first real test of the job.
🤖 Generated with Claude Code
Preview environment is live: https://pr-576-forgegraph.forgegraf.com
Deployed
ef6b90e4with the beta stage's environment. It redeploys on every push and is destroyed when this PR closes.