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:
YeonGyu-Kim
2026-05-08 16:46:05 +09:00
parent 57b9d42537
commit 65fc0d9434
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -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
+1
View File
@@ -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",