From 1d200bd719edbba21dd62f0a3afb38d634fa2b47 Mon Sep 17 00:00:00 2001 From: Jason Stirnaman Date: Fri, 13 Mar 2026 15:10:24 -0500 Subject: [PATCH] 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. --- .circleci/config.yml | 5 ++++- .github/workflows/pr-preview.yml | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 22fda0c22..d2164e913 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.github/workflows/pr-preview.yml b/.github/workflows/pr-preview.yml index 7b4c1c090..9fd528cf0 100644 --- a/.github/workflows/pr-preview.yml +++ b/.github/workflows/pr-preview.yml @@ -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