forked from ismayc/thesisdown
-
Notifications
You must be signed in to change notification settings - Fork 29
/
.travis.yml
44 lines (31 loc) · 1.35 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
# Build on OSX and linux (use our docker container)
matrix:
include:
- os: linux
sudo: required
language: generic
services: docker
env:
global:
- REPO=$DOCKER_USER/huskydown
warnings_are_errors: false
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -t $REPO . ; fi
# push our custom docker container to docker hub, env vars stored on travis-ci.org
# don't forget to set these at https://travis-ci.org/.../...settings
after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker login -u $DOCKER_USER -p $DOCKER_PASS ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export REPO=$DOCKER_USER/huskydown ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi` ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker build -f Dockerfile -t $REPO:$COMMIT . ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker tag $REPO:$COMMIT $REPO:$TAG ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then docker push $REPO ; fi
deploy:
provider: releases
api_key: "$GITHUB_TOKEN"
file: "index/_book/thesis.pdf"
skip_cleanup: true
overwrite: true
on:
condition: $TRAVIS_OS_NAME = osx