-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
50 lines (43 loc) · 2.9 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
sudo: required
services:
- docker
before_install:
- mkdir -p output
- mkdir -p output/de
- mkdir -p output/fr
- mkdir -p output/es
- mkdir -p output/pt
- cp -R docs/images docs/de/
- cp -R docs/images docs/fr/
- cp -R docs/images docs/es/
- cp -R docs/images docs/pt/
- cd output ; cp -R ../docs/images de/ ; cd ..
- cd output ; cp -R ../docs/images fr/ ; cd ..
- cd output ; cp -R ../docs/images es/ ; cd ..
- cd output ; cp -R ../docs/images pt/ ; cd ..
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker pull asciidoctor/docker-asciidoctor:1.17.1
script:
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-html asciidoctor/docker-asciidoctor:1.17.1 asciidoctor -b html5 -d book -a icons=font -a toc=left -D /documents/output docs/*.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-pdf asciidoctor/docker-asciidoctor:1.17.1 asciidoctor-pdf -D /documents/output docs/*.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-html-de asciidoctor/docker-asciidoctor:1.17.1 asciidoctor -b html5 -d book -a icons=font -a toc=left -D /documents/output/de docs/de/*.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-pdf-de asciidoctor/docker-asciidoctor:1.17.1 asciidoctor-pdf -D /documents/output/de docs/de/*.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-html-fr asciidoctor/docker-asciidoctor:1.17.1 asciidoctor -b html5 -d book -a icons=font -a toc=left -D /documents/output/fr docs/fr/*.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-pdf-fr asciidoctor/docker-asciidoctor:1.17.1 asciidoctor-pdf -D /documents/output/fr docs/fr/*.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-html-es asciidoctor/docker-asciidoctor:1.17.1 asciidoctor -b html5 -d book -a icons=font -a toc=left -D /documents/output/es docs/es/*.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-pdf-es asciidoctor/docker-asciidoctor:1.17.1 asciidoctor-pdf -D /documents/output/es docs/es/*.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-html-pt asciidoctor/docker-asciidoctor:1.17.1 asciidoctor -b html5 -d book -a icons=font -a toc=left -D /documents/output/pt docs/pt/*.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-pdf-pt asciidoctor/docker-asciidoctor:1.17.1 asciidoctor-pdf -D /documents/output/pt docs/pt/*.adoc
after_error:
- docker logs asciidoc-to-html
- docker logs asciidoc-to-pdf
after_failure:
- docker logs asciidoc-to-html
- docker logs asciidoc-to-pdf
after_success:
- cd output ; cp -R ../docs/images images; cp -R ../docs/cockpit-ui cockpit-ui
- git init
- git config user.name "${GH_USER_NAME}"
- git config user.email "{GH_USER_EMAIL}"
- git add . ; git commit -m "Deploy to GitHub Pages"
- git push --force "https://${GH_TOKEN}@${GH_REF}" master:gh-pages