forked from appium/appium
-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathgenerate-docs.yml
40 lines (38 loc) · 1.23 KB
/
generate-docs.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
# parameters: # No params yet, but may add later
jobs:
- job: generate_docs
pool:
vmImage: "macOS 10.14"
variables:
CC: gcc
CXX: g++
steps:
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- script: |
# do git stuff
npm install
brew install hub
hub --version
git remote add triager https://triager:[email protected]/appium/appium
git checkout -b generate-docs-$BUILD_SOURCEVERSION
git status
displayName: Checkout Generate Docs Branch
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
- script: |
# Generate the docs
npm run generate-docs
git add .
# log the status so we know what is going on, on failure
git status -s
# If docs were generated, make a PR to update the docs
if [[ -n $(git status -s) ]]; then
git commit -a -n -m 'Update generated docs [ci skip]'
git push triager generate-docs-$BUILD_SOURCEVERSION
hub pull-request -b "appium:master" -h "appium:generate-docs-$BUILD_SOURCEVERSION" -m "docs: Update auto-generated docs"
fi
displayName: Generate Docs and Make PR
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)