forked from mde-book/logo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
43 lines (32 loc) · 1.41 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
sudo: required
branches:
only:
- master
services:
- docker
before_install:
- mkdir -p documentation/output
- mkdir -p documentation/output/zips
- docker pull asciidoctor/docker-asciidoctor
script:
- cd documentation
- docker run -v $TRAVIS_BUILD_DIR/documentation:/documents/ --name asciidoc-to-html asciidoctor/docker-asciidoctor asciidoctor -D /documents/output *.asciidoc
- docker run -v $TRAVIS_BUILD_DIR/documentation:/documents/ --name asciidoc-to-pdf asciidoctor/docker-asciidoctor asciidoctor-pdf -D /documents/output *.asciidoc
- cp -r $TRAVIS_BUILD_DIR/documentation/images $TRAVIS_BUILD_DIR/documentation/output/images
- zip -r $TRAVIS_BUILD_DIR/documentation/output/zips/part2-mmfirst-base.zip $TRAVIS_BUILD_DIR/part2-mmfirst-base
- zip -r $TRAVIS_BUILD_DIR/documentation/output/zips/part2-mmfirst-solution.zip $TRAVIS_BUILD_DIR/part2-mmfirst-solution
- zip -r $TRAVIS_BUILD_DIR/documentation/output/zips/part3-mmfirst-solution.zip $TRAVIS_BUILD_DIR/part3-mmfirst-solution
after_error:
- docker logs asciidoc-to-html
- docker logs asciidoc-to-pdf
after_failure:
- docker logs asciidoc-to-html
- docker logs asciidoc-to-pdf
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: true
local_dir: documentation/output
on:
branch: master