@@ -161,6 +161,14 @@ extends:
161161
162162 - template : /common/config/azure-pipelines/templates/install-node.yaml@self
163163
164+ # Build the custom Docusaurus plugin for api-documenter in the
165+ # rushstack-websites repo.
166+ - script : ' node common/scripts/install-run-rush.js install'
167+ displayName : ' Rush Install (rushstack-websites)'
168+
169+ - script : ' node common/scripts/install-run-rush.js build --to-except api.rushstack.io --verbose'
170+ displayName : ' Rush Build to-except api.rushstack.io (rushstack-websites)'
171+
164172 # Download the api artifact from the triggering publish pipeline.
165173 # AzDO automatically resolves which pipeline resource triggered this run.
166174 - task : DownloadPipelineArtifact@2
@@ -173,10 +181,12 @@ extends:
173181 artifact : api
174182 path : $(Pipeline.Workspace)/api
175183
176- # Install api-documenter from the package feed (just published) and
177- # generate markdown from the *.api.json inputs.
178- - script : ' npx @microsoft/api-documenter@latest markdown --input-folder $(Pipeline.Workspace)/api --output-folder $(Pipeline.Workspace)/api-markdown'
179- displayName : ' Generate API markdown'
184+ # Run api-documenter with the Docusaurus plugin from the
185+ # api.rushstack.io project directory so it picks up
186+ # config/api-documenter.json.
187+ - script : ' npx @microsoft/api-documenter@latest generate --input-folder $(Pipeline.Workspace)/api --output-folder ./docs/pages'
188+ displayName : ' Generate API documentation'
189+ workingDirectory : websites/api.rushstack.io
180190
181191 # Update the API docs folder in rushstack-websites and commit.
182192 - bash : |
@@ -185,11 +195,8 @@ extends:
185195 git config --local user.email rushbot@users.noreply.github.com
186196 git config --local user.name Rushbot
187197
188- # Clear the existing pages and replace with freshly generated markdown.
189- API_DOCS_DIR="websites/api.rushstack.io/docs/pages"
190- rm -rf "$API_DOCS_DIR"
191- mkdir -p "$API_DOCS_DIR"
192- cp -r "$(Pipeline.Workspace)/api-markdown/." "$API_DOCS_DIR/"
198+ # Move the generated nav data file to the expected location.
199+ mv websites/api.rushstack.io/docs/api_nav.json websites/api.rushstack.io/data/api_nav.json
193200
194201 # Check for changes (tracked and untracked)
195202 if git diff --quiet && [ -z "$(git ls-files --others --exclude-standard)" ]; then
0 commit comments