Make the site build install what it needs

The host's build ran `bun run site:build` and stopped at `vite: command not
found`, after `registry:build` had already succeeded — which is exactly the
shape of the fault. `registry:build` needs nothing but bun, and bun was
installed; `viewer:build` needs vite, vite is a devDependency, and nowhere in
the build log is there an install step at all. The runner fetched bun 1.3.14,
went straight to the user command, and everything that did not need
`node_modules` passed on the way to the thing that did.

`site:ci` installs from the lockfile and then builds. It lives in the
repository rather than in a dashboard field because a build command typed into
a web form is not versioned, not reviewable, and not visible to anyone reading
this project later.

CI now runs `site:build` too. It had never run anywhere but a Windows laptop —
the workflow built the app and the registry and rendered the contact sheet, and
never once built the thing that actually gets published. This is the second
time in two days that a step nobody exercised turned out to be the broken one,
and the answer is the same both times: run it where it will run.

Also gitignoring `wrangler.toml`/`.json`/`.jsonc`. Cloudflare's "import a
repository" flow offers to write one, and it describes a WORKER serving static
assets rather than a Pages project. The site is Pages. A config for the other
path does not belong in the tree, and it would not be inert there either: the
build log reports "Checking for configuration in a Wrangler configuration
file", so a stray one changes how the project is treated. There is one sitting
untracked in the working copy right now, which is why this is a rule and not a
deletion.
This commit is contained in:
CRTkafa 2026-08-27 13:37:07 +07:00
parent 7c13f2d66b
commit 672041cceb
3 changed files with 18 additions and 0 deletions

View file

@ -63,6 +63,13 @@ jobs:
- name: Build - name: Build
run: bun run build run: bun run build
# The build the published site is made from. It had never run anywhere
# but a Windows laptop until it failed on the host's runner, so it runs
# here now: `vite` is a devDependency and a host that skips its install
# step gets `vite: command not found` after everything else has passed.
- name: Build the site
run: bun run site:build
# A software rasteriser, no GPU. The contact sheet is uploaded because # A software rasteriser, no GPU. The contact sheet is uploaded because
# geometry checks cannot say "this does not look like a shovel", and # geometry checks cannot say "this does not look like a shovel", and
# having the picture attached to the run is what makes that reviewable. # having the picture attached to the run is what makes that reviewable.

10
.gitignore vendored
View file

@ -28,3 +28,13 @@ scripts/zdiag.ts
# Reference images. They belong to the (private) studio repo, not to the # Reference images. They belong to the (private) studio repo, not to the
# registry that consumers clone. # registry that consumers clone.
references/ references/
# Cloudflare's "import a repository" flow offers to write one of these, and it
# describes a WORKER serving static assets rather than a Pages project. The
# site is deployed as Pages, so a config for the other path does not belong in
# the tree — and it is not inert if it gets there: the build log reports
# "Checking for configuration in a Wrangler configuration file", so a stray one
# would change how the project is treated.
wrangler.toml
wrangler.json
wrangler.jsonc

View file

@ -13,6 +13,7 @@
"registry:validate": "vibe3d registry validate my-registry/dist/registry.json", "registry:validate": "vibe3d registry validate my-registry/dist/registry.json",
"viewer:build": "vite build --config vite.viewer.config.ts && bun scripts/build-artifact.ts", "viewer:build": "vite build --config vite.viewer.config.ts && bun scripts/build-artifact.ts",
"site:build": "bun run registry:build && bun run viewer:build && bun scripts/build-site.ts", "site:build": "bun run registry:build && bun run viewer:build && bun scripts/build-site.ts",
"site:ci": "bun install --frozen-lockfile && bun run site:build",
"verify:glb": "bun scripts/verify-glb.ts", "verify:glb": "bun scripts/verify-glb.ts",
"render": "bun scripts/render.ts", "render": "bun scripts/render.ts",
"export:glb": "bun scripts/export-glb.ts" "export:glb": "bun scripts/export-glb.ts"