forked from bat/bat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (45 loc) · 1.6 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
50
51
52
53
54
sudo: required
language: cpp
os:
- linux
notifications:
- email: false
services:
- docker
env:
- DOCKER_IMAGE=batk/bat-testenv:centos7-root6
- DOCKER_IMAGE=batk/bat-testenv:centos7-root5
before_install:
- docker pull "$DOCKER_IMAGE"
- export DOCKER_INSTANCE=`docker run -it -d "$DOCKER_IMAGE" /bin/bash`
- docker cp . "$DOCKER_INSTANCE:/root/bat"
script:
- docker exec "$DOCKER_INSTANCE" /bin/sh -c "cd /root/bat && tools/test-bat.sh"
jobs:
include:
- stage: doc
env: DOCKER_IMAGE=batk/bat-testenv:ubuntu16.04-root6
script:
- set -e
- docker pull "$DOCKER_IMAGE"
- export DOCKER_INSTANCE=`docker run -it -d "$DOCKER_IMAGE" /bin/bash`
- docker cp . "$DOCKER_INSTANCE:/root/bat"
- docker exec "$DOCKER_INSTANCE" /bin/sh -c "cd /root/bat && tools/doc-bat.sh"
# save the docs for deployment
# TODO define dirs as variables to save typing
- mkdir -p artefacts/master/ref-guide
- mkdir -p artefacts/master/manual
- docker cp "$DOCKER_INSTANCE":/root/bat/doc/ref-guide/html/ artefacts/master/ref-guide/
- docker cp "$DOCKER_INSTANCE":/root/bat/doc/manual/BAT-manual.pdf artefacts/master/manual/
- docker cp "$DOCKER_INSTANCE":/root/bat/doc/manual/html/ artefacts/master/manual/
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN # Set in travis-ci.org dashboard, marked secure
keep-history: true
on:
branch: manual
repo: bat/bat-docs
target-branch: master
verbose: true
local-dir: artefacts