-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathgenerate-doc.yml
More file actions
31 lines (26 loc) · 1.17 KB
/
generate-doc.yml
File metadata and controls
31 lines (26 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
parameters:
ServiceDirectory: not-specified
steps:
- script: |
npm install
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/generate-doc
displayName: "Install tool dependencies"
- script: |
npm run build
workingDirectory: $(System.DefaultWorkingDirectory)/eng/tools/generate-doc
displayName: "Compile tool"
- pwsh: |
node $(Build.SourcesDirectory)/eng/tools/generate-doc/dist/index.js --serviceDir "${{parameters.ServiceDirectory}}"
displayName: "Run Typedoc Docs"
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
- pwsh: |
if ('$(ChangedServices)' -and '$(ChangedServices)' -notlike '*ChangedServices*') {
foreach($service in '$(ChangedServices)'.Split(" ")) {
node $(Build.SourcesDirectory)/eng/tools/generate-doc/dist/index.js --serviceDir "$service"
}
}
displayName: "Run Typedocs for PR"
condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest'))
- pwsh: |
$(Build.SourcesDirectory)/eng/tools/compress-subfolders.ps1 "$(Build.SourcesDirectory)/docGen" "$(Build.SourcesDirectory)/docGen"
displayName: "Compress generated docs"