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