This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.azure-documentation-release.yml
79 lines (66 loc) · 1.96 KB
/
.azure-documentation-release.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
resources:
repositories:
- repository: DocuTheme
type: github
endpoint: Innoactive
name: Innoactive/Hub-Documentation-DocFx-Theme
trigger:
branches:
include:
- master
- develop
paths:
include:
- '.Documentation/*'
pr: none
parameters:
- name: release
type: boolean
default: false
pool: Unity
jobs:
- job:
displayName: "Build and Publish Documentation"
workspace:
clean: all
steps:
- checkout: DocuTheme
lfs: true
- checkout: self
lfs: true
- powershell: |
$TAG = (git describe --all --match "v*").Split("-")[0].Replace("tags/", "").TrimStart("v")
Write-Host "##vso[task.setvariable variable=Version]$TAG"
workingDirectory: 'Creator'
displayName: 'Parse build Tag'
- task: CopyFiles@2
inputs:
SourceFolder: 'Hub-Documentation-DocFx-Theme/'
Contents: '**'
TargetFolder: 'Creator/.Documentation/theme'
displayName: Copy Theme
- task: Npm@1
inputs:
command: 'custom'
workingDir: 'Creator/.Documentation/theme'
customCommand: 'install'
displayName: Prepare Theme
- task: Npm@1
inputs:
command: 'custom'
workingDir: 'Creator/.Documentation/theme'
customCommand: 'run build'
displayName: Build Theme
- task: NuGetCommand@2
inputs:
command: 'custom'
arguments: 'install docfx.console -Version 2.54.0'
displayName: Installing DocFx
- script: docfx --globalMetadata "{_gaTrackingId:\"$(gaTrackingId)\",_version:\"v$(Version)\"}" Creator\.Documentation\docfx.json
displayName: "Building Documentation"
- task: PublishPipelineArtifact@1
inputs:
targetPath: 'Creator/.Documentation/_site'
artifact: 'documentation'
publishLocation: 'pipeline'
displayName: Store Documentation