azure-sdk-for-cpp/eng/pipelines/doc-index.yml
Danny Amirault 5dff0dad92
Initial CI pipeline work (#36)
* Replicate C pipeline files to CPP

* Adjust to build CPP

* Remove pipeline pieces copied from C that are not needed for C++ build.

* Remove extraneous debugging step.
2020-03-18 13:32:30 -07:00

59 lines
1.9 KiB
YAML

resources:
repositories:
- repository: azure-sdk-tools
type: github
name: azure/azure-sdk-tools
endpoint: azure
jobs:
- job: GenerateDocIndex
pool:
vmImage: windows-2019
steps:
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
inputs:
versionSpec: '3.6'
- template: eng/pipelines/templates/scripts/replace-relative-links.yml@azure-sdk-tools
parameters:
TargetFolder: '.'
RootFolder: '.'
BuildSHA: $(Build.SourceVersion)
RepoId: 'Azure/azure-sdk-for-cpp'
- pwsh: |
Invoke-WebRequest -MaximumRetryCount 10 -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.SourcesDirectory)
displayName: Download and Extract DocFX
- pwsh: >-
$(Build.SourcesDirectory)/eng/docs/index/Generate-DocIndex.ps1
-RepoRoot $(Build.SourcesDirectory)
-DocGenDir "$(Build.SourcesDirectory)/eng/docs/index"
-verbose
displayName: 'Generate Doc Index'
- task: UsePythonVersion@0
displayName: 'Use Python 3.6'
inputs:
versionSpec: '3.6'
- template: eng/pipelines/templates/scripts/mashup-doc-index.yml@azure-sdk-tools
parameters:
SourceDirectory: $(Build.SourcesDirectory)
- task: CopyFiles@2
displayName: Copy HTML to Artifacts Directory
inputs:
sourceFolder: $(Build.SourcesDirectory)/docfx_project/
content: '**\*'
targetFolder: $(Build.ArtifactStagingDirectory)/docfx_project
overWrite: true
- task: PublishPipelineArtifact@0
condition: succeeded()
inputs:
artifactName: "Doc.Index"
targetPath: $(Build.ArtifactStagingDirectory)/docfx_project/_site