-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructuring generate-doc code folder (#5252)
Includes updated docs generation old pipeline, refactored and improved generate-docs code, generating docs in ci and separate pipeline for the new index generation
- Loading branch information
1 parent
e6cf99c
commit 211d751
Showing
22 changed files
with
2,278 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
jobs: | ||
- job: "Build" | ||
variables: | ||
- template: templates/variables/globals.yml | ||
pool: | ||
vmImage: "windows-2019" | ||
steps: | ||
- pwsh: | | ||
Invoke-WebRequest -Uri "https://github.com/dotnet/docfx/releases/download/v2.43.2/docfx.zip" ` | ||
-OutFile "docfx.zip" | Wait-Process; Expand-Archive -Path "docfx.zip" -DestinationPath "./docfx/" | ||
workingDirectory: $(Build.BinariesDirectory) | ||
displayName: Download and Extract DocFX | ||
- pwsh: | | ||
$(Build.BinariesDirectory)/docfx/docfx.exe init -q | ||
displayName: Provision DocFX Directory | ||
workingDirectory: $(Build.SourcesDirectory) | ||
- pwsh: | | ||
mkdir "templates" | ||
displayName: Create Template Directory | ||
workingDirectory: $(Build.SourcesDirectory)/docfx_project/ | ||
- pwsh: | | ||
Copy-Item "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/docfx.json" -Destination "$(Build.SourcesDirectory)/docfx_project/" -Force | ||
displayName: Copy over docfx.json | ||
- script: | | ||
npm install | ||
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/generate-static-index | ||
displayName: "Install tool dependencies" | ||
- pwsh: | | ||
node $(Build.SourcesDirectory)/eng/tools/generate-static-index/index.js | ||
displayName: "Generate Index Toc" | ||
- pwsh: | | ||
New-Item -Path "$(Build.SourcesDirectory)/docfx_project" -Name "toc.yml" -Force | ||
Add-Content -Path "$(Build.SourcesDirectory)/docfx_project/toc.yml" -Value "- name: Azure SDK for JavaScript APIs`r`n href: api/`r`n homepage: api/index.md" | ||
Copy-Item "$(Build.SourcesDirectory)/README.md" -Destination "$(Build.SourcesDirectory)/docfx_project/api/index.md" -Force | ||
Copy-Item "$(Build.SourcesDirectory)/README.md" -Destination "$(Build.SourcesDirectory)/docfx_project/index.md" -Force | ||
displayName: Update toc.yml and index | ||
- pwsh: | | ||
$(Build.BinariesDirectory)/docfx/docfx.exe build | ||
displayName: Build Doc Content | ||
workingDirectory: $(Build.SourcesDirectory)/docfx_project/ | ||
- pwsh: | | ||
Copy-Item "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/assets/*" -Destination "$(Build.SourcesDirectory)/docfx_project/_site/" -Force | ||
Get-Content "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/main.js" |Out-File "$(Build.SourcesDirectory)/docfx_project/_site/styles/main.js" | ||
Get-Content "$(Build.SourcesDirectory)/eng/tools/generate-static-index/static-files/docfx.css" |Out-File "$(Build.SourcesDirectory)/docfx_project/_site/styles/docfx.css" | ||
Copy-Item "$(Build.SourcesDirectory)/docfx_project/*" -Destination "$(Build.ArtifactStagingDirectory)/docfx_project/" -Recursive -Force | ||
displayName: Replace site assets and Copy HTML to Artifacts Directory | ||
- task: PublishPipelineArtifact@0 | ||
condition: succeeded() | ||
inputs: | ||
artifactName: "Doc.Index" | ||
targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.