-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
30 lines (24 loc) · 1003 Bytes
/
.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
sudo: required
services:
- docker
before_install:
- mkdir -p output
- docker pull ansiz/docker-asciidoctor-cn
script:
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-html ansiz/docker-asciidoctor-cn asciidoctor -D dist *.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-pdf ansiz/docker-asciidoctor-cn asciidoctor-pdf -D dist -r asciidoctor-pdf-cjk-kai_gen_gothic -a pdf-style=KaiGenGothicCN *.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 ;
- git clone https://github.com/China-HPC/user-guide-dist.git
- cd user-guide-dist
- cp ../../dist/* ./
- git config user.name "${GH_USER_NAME}"
- git config user.email "{GH_USER_EMAIL}"
- git add . ; git commit -m "Auto Deploy to GitHub Pages"
- git push --force --quiet "https://${GH_TOKEN}@${GH_REF}"