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
parent
38235d66c8
commit
1d200bd719
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue