ci: generate docs content before web checks; bun prepare hook for local dev
The first build of #3860 failed at type-check because the generated `lib/docs-content.generated.ts` is gitignored (regenerated on every build) and CI's `type-check` step runs before `build`. Two fixes: - web-ci.yml: explicit `Generate docs content from repo-root docs/` step right after `bun install` so format-check, lint, and type-check all see the file. - web/package.json: add `prepare` lifecycle script. `bun install` invokes it automatically, so a fresh local checkout boots into a working state too. Build still re-runs the generator via prebuild, so docs/ edits land in the bundle without an explicit dev action.
This commit is contained in:
@@ -34,6 +34,9 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Generate docs content from repo-root docs/
|
||||
run: node ./scripts/generate-docs-content.mjs
|
||||
|
||||
- name: Format check
|
||||
run: bun run format:check
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"prepare": "node ./scripts/generate-docs-content.mjs",
|
||||
"prebuild": "node ./scripts/prepare-build.mjs",
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
|
||||
Reference in New Issue
Block a user