forked from contao/docs-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
37 lines (32 loc) · 3.3 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
language: python
env:
global:
- secure: "WvexIfR2nvMn77kHv4PVTiXBC9U8YkpcCbPPHr3/HWWU29t9dxerOgfNIfO0LgPYhV2yb9NJ8sLBW6/8Vs/DS8gSVnsn/IBwQXDwwcgymzkNYampq59do/56FxwFzvSk0DqJbNkmNjLzzJsdTR5mK6weN0fT50h76eUkGuLoZKM="
- secure: "cua8Ei2rrCZBjv/7sXRcizHS3UBOQ6v1OrzOTlWuwGN7jpQQS+W/gbMnsteBh4SLnXziVzsefrcy+z4iyMnGViyXZ0InfZ82BEe/Tuu2zY8lCPMvGomNv0OUXYzMBTbf/QPNe7GezoatIrL/4Qu8/GHuOYA/I39ZDxU1iDVn9tc="
sudo: required
install:
- sudo apt-get install sshpass
- sudo -v && wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | sudo python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()"
- npm install ebook-convert
- npm install gitbook-cli -g
- pip install html5validator
- gitbook install ./manual
- gitbook install ./cookbook
- gitbook install ./contao4-migration
script:
- gitbook build ./manual
- html5validator --root manual/_book/ --ignore "gitbook/plugins"
- gitbook pdf ./manual ./manual.pdf
- gitbook build ./cookbook
- html5validator --root cookbook/_book/ --ignore "gitbook/plugins"
- gitbook pdf ./cookbook ./cookbook.pdf
- gitbook build ./contao4-migration
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "3.2" -o $TRAVIS_BRANCH == "3.4" -o $TRAVIS_BRANCH == "3.5" && sshpass -p $SCP_PASSWORD rsync -avz -e "ssh -o StrictHostKeyChecking=no" ./manual/_book/* [email protected]:/home/$SCP_USER/public/books/manual/$TRAVIS_BRANCH/
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "3.2" -o $TRAVIS_BRANCH == "3.4" -o $TRAVIS_BRANCH == "3.5" && sshpass -p $SCP_PASSWORD rsync -avz -e "ssh -o StrictHostKeyChecking=no" ./manual_en.pdf [email protected]:/home/$SCP_USER/public/books/contao-manual-$TRAVIS_BRANCH.pdf
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "3.2" -o $TRAVIS_BRANCH == "3.4" -o $TRAVIS_BRANCH == "3.5" && sshpass -p $SCP_PASSWORD rsync -avz -e "ssh -o StrictHostKeyChecking=no" ./manual_de.pdf [email protected]:/home/$SCP_USER/public/books/contao-handbuch-$TRAVIS_BRANCH.pdf
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "3.2" -o $TRAVIS_BRANCH == "3.4" -o $TRAVIS_BRANCH == "3.5" && sshpass -p $SCP_PASSWORD rsync -avz -e "ssh -o StrictHostKeyChecking=no" ./manual_fr.pdf [email protected]:/home/$SCP_USER/public/books/contao-manuel-$TRAVIS_BRANCH.pdf
- test $TRAVIS_PULL_REQUEST == "false" -a $TRAVIS_BRANCH == "master" && sshpass -p $SCP_PASSWORD rsync -avz -e "ssh -o StrictHostKeyChecking=no" ./manual/_book/* [email protected]:/home/$SCP_USER/public/books/manual/current/
- test $TRAVIS_PULL_REQUEST == "false" -a $TRAVIS_BRANCH == "master" && sshpass -p $SCP_PASSWORD rsync -avz -e "ssh -o StrictHostKeyChecking=no" ./cookbook/_book/* [email protected]:/home/$SCP_USER/public/books/cookbook/
- test $TRAVIS_PULL_REQUEST == "false" -a $TRAVIS_BRANCH == "master" && sshpass -p $SCP_PASSWORD rsync -avz -e "ssh -o StrictHostKeyChecking=no" ./cookbook/cookbook.pdf [email protected]:/home/$SCP_USER/public/books/contao-cookbook.pdf
- test $TRAVIS_PULL_REQUEST == "false" -a $TRAVIS_BRANCH == "master" && sshpass -p $SCP_PASSWORD rsync -avz -e "ssh -o StrictHostKeyChecking=no" ./contao4-migration/_book/* [email protected]:/home/$SCP_USER/public/books/contao4-migration/