Files
Hanzo Dev 6c4804ad73 fix(build): declare the env the docs build reads so turbo stops stripping it
turbo runs tasks in strict env mode (2.x default): a task only sees the env
vars declared for it. `build` declared none, so every var the deploy workflow
exports was dropped before the build ran:

  NEXT_EXPORT   -> next.config gates `output: 'export'` on it. Stripped, the
                   build emits no out/, and the next workflow step is
                   `wrangler pages deploy out`.
  HANZO_DOCS_SYNC -> pre-build gates the project-docs sync on it. Stripped, the
                   sync runs — the workflow sets it to 0 precisely so the
                   committed snapshot is used instead.
  NODE_OPTIONS  -> the heap ceiling the workflow raises for this build.

`turbo run build --filter=docs --dry=json` reported envMode "strict" with
configured [] and passthrough null; it now lists NEXT_EXPORT, HANZO_DOCS_SYNC
and NODE_OPTIONS.

This regressed in 6167d746c, which moved NEXT_EXPORT and NODE_OPTIONS out of the
app's build script — where they were inline and immune to turbo's env filter —
into the workflow's env block.

The two vars that select what is built (NEXT_EXPORT, HANZO_DOCS_SYNC) belong in
`env`, where they also key the cache: a non-export build and an export build are
not interchangeable artifacts. NODE_OPTIONS only shapes how the build runs, so
it is passThroughEnv and stays out of the hash. The wildcards cover the rest of
the HANZO_DOCS_*/HANZO_SEARCH_* knobs the build scripts read, so the next one
added does not silently vanish.
2026-07-15 22:22:04 -07:00

49 lines
901 B
JSON

{
"$schema": "https://turbo.build/schema.json",
"globalEnv": [
"HANZO_PUBLISHABLE_KEY",
"GITHUB_APP_PRIVATE_KEY",
"GITHUB_APP_ID",
"GITHUB_TOKEN"
],
"ui": "stream",
"tasks": {
"build": {
"dependsOn": ["^build"],
"env": [
"NEXT_EXPORT",
"GITHUB_PAGES",
"DOCS_SECTION",
"ANALYZE",
"HANZO_DOCS_*",
"HANZO_SEARCH_*"
],
"passThroughEnv": ["NODE_OPTIONS"],
"outputs": [
".output",
"public/registry",
".source/**",
".next/**",
"!.next/cache/**",
"dist/**",
"css/generated/**",
"out",
"build",
".vercel"
]
},
"lint": {},
"types:check": {
"dependsOn": [],
"outputs": []
},
"clean": {
"cache": false
},
"dev": {
"cache": false,
"persistent": true
}
}
}