This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
update-docs.yaml
114 lines (97 loc) · 3.21 KB
/
update-docs.yaml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
pool:
name: '1ES-Host-Ubuntu'
schedules:
# minute 0, hour 15 in UTC (8am in UTC+7), any day of month, any month, days 1-5 of week (M-F)
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?tabs=yaml&view=azure-devops#supported-cron-syntax
- cron: '0 15 * * 1-5'
displayName: 'Daily release (M-F at 8am)' # will be 7am when DST ends unless trigger is updated
branches:
include:
- main
always: true
steps:
- task: NodeTool@0
displayName: 'Use Node 10.x'
inputs:
versionSpec: '10.x'
checkLatest: true
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- task: Npm@1
displayName: 'npm install OUFR and @uifabric/fabric-website latest version'
inputs:
command: custom
verbose: false
customCommand: install --save-dev office-ui-fabric-react @uifabric/fabric-website
- task: Npm@1
displayName: 'npm install sdp converter tool'
inputs:
command: custom
verbose: false
customCommand: install --save-dev office2sdp
- task: Npm@1
displayName: 'npm run build'
inputs:
command: custom
verbose: false
customCommand: run build
# Extract office-ui-fabric-react package version and write it in a file
# so it can be used in the release pipeline to keep record of each update.
- script: >
node
lib/writeFabricVersion.js
$(Build.ArtifactStagingDirectory)/FABRIC_VERSION
displayName: Get OUFR Version
# Download all the api.json files that are uploaded to an azure blob storage
# every morning after a scheduled release pipeline.
- script: >
node
lib/downloadApiFiles.js
$(System.DefaultWorkingDirectory)/input
displayName: Download all api.json files
- script: >
node
lib/start.js
$(Build.ArtifactStagingDirectory)/example-and-overview-files
$(System.DefaultWorkingDirectory)/input
displayName: Generate examples/overview files and API Documenter Config
- script: >
node
node_modules/.bin/api-documenter
generate
--output-folder $(Build.ArtifactStagingDirectory)/doc-files/api
--input-folder $(System.DefaultWorkingDirectory)/input
displayName: Run API Documenter
# This script is a temporary workaround until we have a fix upstream in the api-documenter
- script: >
node
lib/modifyToc.js
$(Build.ArtifactStagingDirectory)/doc-files/api
displayName: Inject additional line in TOC.yml
- script: >
node
node_modules/.bin/sdp-cli
-s $(Build.ArtifactStagingDirectory)/doc-files/api
displayName: Run SDP converter
- task: CopyFiles@2
displayName: 'Copy example and overview files'
inputs:
SourceFolder: $(Build.ArtifactStagingDirectory)/example-and-overview-files
TargetFolder: $(Build.ArtifactStagingDirectory)/doc-files/api
- task: CopyFiles@2
displayName: 'Copy static doc data'
inputs:
SourceFolder: 'static-doc-data'
TargetFolder: $(Build.ArtifactStagingDirectory)/doc-files/
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: DOC-FILES'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/doc-files'
ArtifactName: DOC-FILES
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: FABRIC-VERSION'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/FABRIC_VERSION'
ArtifactName: FABRIC_VERSION