forked from Open-EO/openeo-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
55 lines (47 loc) · 1.6 KB
/
.travis.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
language: python
python:
- "3.5"
node_js:
- "8"
sudo: required
before_install:
- npm install -g speccy
- speccy lint openapi.json -r "speccy.yml"
- pip install openapi-spec-validator
- openapi-spec-validator openapi.json
# DIY example validation (PR#194)
- pip install -r tests/requirements.txt
- pytest tests
install:
- pip install mkdocs
- pip install mkdocs-material
- pip install mkdocs-macros-plugin
- pip install pymdown-extensions
- pip install pygments
- npm install -g asyncapi-generator@0.6.7 # 0.7 only supports AsyncAPI 2.0
- npm install -g concat-json-files
script:
- concat-json-files "processes/*.json" -t "processes.json"
- mv CHANGELOG.md docs/changelog.md
- ag subscriptions.json markdown
- \mv -f asyncapi.md docs/apireference-subscriptions.md
- mkdocs build --clean
- cp *.json site/
- \mv -f docs/apireference.html site/apireference/index.html
- \mv -f docs/processreference.html site/processreference/index.html
- cp processes/*.json site/processreference/
before_deploy:
- git clone --branch gh-pages https://$GITHUB_TOKEN@github.com/Open-EO/openeo-api.git gh-pages
- cd gh-pages
- if [[ $TRAVIS_BRANCH == 'master' ]] ; then rm -rf !(v) && cp -R ../site/* ./ ; fi
- if [[ $TRAVIS_BRANCH == 'draft' ]] ; then rm -rf draft/ && mkdir -p draft/ && cp -R ../site/* draft/ ; fi
- if [[ $TRAVIS_BRANCH =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then rm -rf v/$TRAVIS_BRANCH/ && mkdir -p v/$TRAVIS_BRANCH/ && cp -R ../site/* v/$TRAVIS_BRANCH/ ; fi
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
committer-from-gh: true
local-dir: gh-pages
on:
all_branches: true