This repository has been archived by the owner on Jan 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.travis.yml
50 lines (50 loc) · 4.58 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
language: python
sudo: false
python:
- '2.7'
install:
- pip install -r requirements.txt
script:
- make allhtml
after_success:
- CURRENT_HASH=`git rev-parse HEAD`
- export RELEASE_VERSION=`git tag | tail -n 1`
- RELEASE_HASH=`git rev-list $RELEASE_VERSION -n 1`
- if [ "$CURRENT_HASH" = "$RELEASE_HASH" ]; then export DEPLOY_DOCS=true; fi
- test -z "$DEPLOY_DOCS" || openssl aes-256-cbc -K $encrypted_15c7e38b27fc_key -iv $encrypted_15c7e38b27fc_iv
-in stormpath_documentation_auto_doc_build.enc -out ~/.ssh/id_rsa -d
- test -z "$DEPLOY_DOCS" || chmod 600 ~/.ssh/id_rsa
- test -z "$DEPLOY_DOCS" || git config --global user.email "[email protected]"
- test -z "$DEPLOY_DOCS" || git config --global user.name "stormpath-documentation
Auto Doc Build"
- test -z "$DEPLOY_DOCS" || git clone [email protected]:stormpath/stormpath.github.io.git
- test -z "$DEPLOY_DOCS" || cd stormpath.github.io
- test -z "$DEPLOY_DOCS" || git fetch origin source:source
- test -z "$DEPLOY_DOCS" || git checkout source
- test -z "$DEPLOY_DOCS" || rm -rf source/rest/product-guide/latest && mkdir -p source/rest/product-guide && cp -r ../build/html/rest source/rest/product-guide/latest
- test -z "$DEPLOY_DOCS" || rm -rf source/php/product-guide/latest && mkdir -p source/php/product-guide && cp -r ../build/html/php source/php/product-guide/latest
- test -z "$DEPLOY_DOCS" || rm -rf source/java/product-guide/latest && mkdir -p source/java/product-guide && cp -r ../build/html/java source/java/product-guide/latest
- test -z "$DEPLOY_DOCS" || rm -rf source/csharp/product-guide/latest && mkdir -p source/csharp/product-guide && cp -r ../build/html/csharp source/csharp/product-guide/latest
- test -z "$DEPLOY_DOCS" || rm -rf source/vbnet/product-guide/latest && mkdir -p source/vbnet/product-guide && cp -r ../build/html/vbnet source/vbnet/product-guide/latest
- test -z "$DEPLOY_DOCS" || rm -rf source/python/product-guide/latest && mkdir -p source/python/product-guide && cp -r ../build/html/python source/python/product-guide/latest
- test -z "$DEPLOY_DOCS" || rm -rf source/nodejs/product-guide/latest && mkdir -p source/nodejs/product-guide && cp -r ../build/html/nodejs source/nodejs/product-guide/latest
- test -z "$DEPLOY_DOCS" || rm -rf source/ruby/product-guide/latest && mkdir -p source/ruby/product-guide && cp -r ../build/html/ruby source/ruby/product-guide/latest
- test -z "$DEPLOY_DOCS" || rm source/rest/product-guide/latest/configuration.html
- test -z "$DEPLOY_DOCS" || cp source/rest/product-guide/latest/errorpage.html source/rest/product-guide/latest/configuration.html && rm -f source/rest/product-guide/latest/errorpage.html
- test -z "$DEPLOY_DOCS" || rm source/csharp/product-guide/latest/reference.html
- test -z "$DEPLOY_DOCS" || cp source/csharp/product-guide/latest/errorpage.html source/csharp/product-guide/latest/reference.html && rm -f source/csharp/product-guide/latest/errorpage.html
- test -z "$DEPLOY_DOCS" || rm source/java/product-guide/latest/reference.html
- test -z "$DEPLOY_DOCS" || cp source/java/product-guide/latest/errorpage.html source/java/product-guide/latest/reference.html && rm -f source/java/product-guide/latest/errorpage.html
- test -z "$DEPLOY_DOCS" || rm source/nodejs/product-guide/latest/reference.html
- test -z "$DEPLOY_DOCS" || cp source/nodejs/product-guide/latest/errorpage.html source/nodejs/product-guide/latest/reference.html && rm -f source/nodejs/product-guide/latest/errorpage.html
- test -z "$DEPLOY_DOCS" || rm source/ruby/product-guide/latest/reference.html
- test -z "$DEPLOY_DOCS" || cp source/ruby/product-guide/latest/errorpage.html source/ruby/product-guide/latest/reference.html && rm -f source/ruby/product-guide/latest/errorpage.html
- test -z "$DEPLOY_DOCS" || rm source/php/product-guide/latest/reference.html
- test -z "$DEPLOY_DOCS" || cp source/php/product-guide/latest/errorpage.html source/php/product-guide/latest/reference.html && rm -f source/php/product-guide/latest/errorpage.html
- test -z "$DEPLOY_DOCS" || rm source/python/product-guide/latest/reference.html
- test -z "$DEPLOY_DOCS" || cp source/python/product-guide/latest/errorpage.html source/python/product-guide/latest/reference.html && rm -f source/python/product-guide/latest/errorpage.html
- test -z "$DEPLOY_DOCS" || rm source/vbnet/product-guide/latest/reference.html
- test -z "$DEPLOY_DOCS" || cp source/vbnet/product-guide/latest/errorpage.html source/vbnet/product-guide/latest/reference.html && rm -f source/vbnet/product-guide/latest/errorpage.html
- test -z "$DEPLOY_DOCS" || git add --all
- test -z "$DEPLOY_DOCS" || git commit -m "stormpath-documentation release $RELEASE_VERSION"
- test -z "$DEPLOY_DOCS" || git push origin source