fix(ci): add TypeScript build step for API documentation scripts

generate-api-docs.sh now calls post-process-specs.js and
generate-openapi-articles.js from api-docs/scripts/dist/, which
requires compiling TypeScript first. The dist/ directory is
gitignored, so CI must run tsc before generating API docs.
pull/6942/head
Jason Stirnaman 2026-03-13 15:10:24 -05:00
parent 38235d66c8
commit 1d200bd719
2 changed files with 8 additions and 1 deletions

View File

@ -26,9 +26,12 @@ jobs:
- run:
name: Install API documentation dependencies
command: cd api-docs && yarn install
- run:
name: Build API documentation scripts
command: npx tsc --project api-docs/scripts/tsconfig.json
- run:
name: Generate API documentation
command: cd api-docs && bash generate-api-docs.sh
command: cd api-docs && bash generate-api-docs.sh
- run:
name: Inject Flux stdlib frontmatter
command: node ./flux-build-scripts/inject-flux-stdlib-frontmatter.cjs

View File

@ -115,6 +115,10 @@ jobs:
echo "No pages to deploy - skipping preview"
echo "Reason: ${{ steps.detect.outputs.skip-reason || steps.detect.outputs.change-summary }}"
- name: Build API documentation scripts
if: steps.detect.outputs.has-api-doc-changes == 'true' && steps.detect.outputs.pages-to-deploy != '[]'
run: npx tsc --project api-docs/scripts/tsconfig.json
- name: Build API docs
if: steps.detect.outputs.has-api-doc-changes == 'true' && steps.detect.outputs.pages-to-deploy != '[]'
run: yarn run build:api-docs