forked from teiid/teiid-documents
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (43 loc) · 1.78 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
language: node_js
- "8.9.0"
install:
- npm install -g gitbook-cli
- cd wildfly
- gitbook install
- cd ..
- cd spring
- gitbook install
- cd ..
- sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
script:
- gitbook build wildfly content
- gitbook pdf wildfly teiid-documents.pdf
- gitbook build spring sb
after_success: |
if [ -n "$GITHUB_API_KEY" ]; then
git checkout --orphan $TRAVIS_BRANCH-gh-pages
git rm -rf .
git add -f --ignore-errors --all sb content teiid-documents.pdf
git -c user.name='travis' -c user.email='travis' commit -m 'ci publishing'
git push -f -q https://$GITHUB_USER:[email protected]/$TRAVIS_REPO_SLUG $TRAVIS_BRANCH-gh-pages
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" 1>/dev/null
git fetch origin gh-pages
git checkout gh-pages
if [ ! -d "$TRAVIS_BRANCH" ]; then
git submodule add -b $TRAVIS_BRANCH-gh-pages https://github.com/$TRAVIS_REPO_SLUG $TRAVIS_BRANCH
git -c user.name='travis' -c user.email='travis' commit -am "adding submodule"
git push -q https://$GITHUB_USER:[email protected]/$TRAVIS_REPO_SLUG gh-pages
fi
git submodule update --init --remote --no-fetch $TRAVIS_BRANCH
git pull
git submodule update --remote --no-fetch --merge
git -c user.name='travis' -c user.email='travis' commit -am "updating submodules"
git push -q https://$GITHUB_USER:[email protected]/$TRAVIS_REPO_SLUG gh-pages
fi
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/5ada7bbc05b2a99cff40
on_success: change
on_failure: always
on_start: never