Skip to content

Commit 7cdc1d7

Browse files
committed
ci: fold the docs drift assertion into the codegen check
1 parent 98675ce commit 7cdc1d7

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ jobs:
2424

2525
# Hermetic: regenerates from the committed spec, so this verifies that the committed
2626
# generated code still reproduces from it, with no network dependency. Refreshing the
27-
# spec itself is the release workflow's job.
27+
# spec itself is the release workflow's job. `generate` also runs sync-docs (see
28+
# scripts/generate.ts), so the docs are asserted in the same diff rather than by a
29+
# second identical run.
2830
- name: Codegen drift check
2931
env:
3032
ROXYAPI_SPEC_FILE: specs/openapi.json
3133
run: |
3234
bun run generate
33-
git diff --exit-code -- specs/openapi.json src/client.gen.ts src/sdk.gen.ts src/types.gen.ts src/client src/core \
35+
git diff --exit-code -- specs/openapi.json src/client.gen.ts src/sdk.gen.ts src/types.gen.ts src/client src/core README.md AGENTS.md docs/llms-full.txt \
3436
|| { echo 'codegen drift: commit the regenerated files'; exit 1; }
3537
3638
- name: Lint
@@ -39,11 +41,5 @@ jobs:
3941
- name: Typecheck
4042
run: bun typecheck
4143

42-
- name: Docs drift check
43-
run: |
44-
bun run docs:sync
45-
git diff --exit-code -- README.md AGENTS.md docs/llms-full.txt \
46-
|| { echo 'docs drift: commit the regenerated README.md/AGENTS.md/llms-full.txt'; exit 1; }
47-
4844
- name: Test
4945
run: bun run test

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,11 @@ jobs:
3232

3333
- run: bun install --frozen-lockfile
3434

35+
# Also runs sync-docs internally (scripts/generate.ts), so README/AGENTS/llms-full
36+
# are already refreshed by the time the commit step stages them.
3537
- name: Regenerate SDK
3638
run: bun run generate
3739

38-
- name: Sync docs from spec
39-
run: bun run docs:sync
40-
4140
- name: Check if spec changed
4241
id: diff
4342
run: |

0 commit comments

Comments
 (0)