.travis.yml 1002 字节
Newer Older
L
Luo Tao 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
language: cpp
cache: ccache
sudo: required
dist: trusty
os:
  - linux
env:
  - JOB=PRE_COMMIT

addons:
  apt:
    packages:
      - git
      - python
      - python-pip
      - python2.7-dev
G
gongweibao 已提交
17
      - golang
D
daming-lu 已提交
18
  ssh_known_hosts: 52.76.173.135
L
Luo Tao 已提交
19
before_install:
T
typhoonzero 已提交
20
  -  sudo pip install -U virtualenv pre-commit pip
G
gongweibao 已提交
21
  -  GOPATH=/tmp/go go get -u github.com/wangkuiyi/ipynb/markdown-to-ipynb
L
Luo Tao 已提交
22
script:
L
Luo Tao 已提交
23
  -  PATH=/tmp/go/bin:$PATH .travis/precommit.sh
D
daming-lu 已提交
24
  - |
D
daming-lu 已提交
25 26
    if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then exit 0; fi;
    if [[ "$TRAVIS_BRANCH" != "develop"  && ! "$TRAVIS_BRANCH" =~ ^v[[:digit:]]+\.[[:digit:]]+(\.[[:digit:]]+)?(-\S*)?$ ]]; then echo "not develop branch, no deploy"; exit 0; fi;
27
    export DEPLOY_DOCS_SH=https://raw.githubusercontent.com/PaddlePaddle/PaddlePaddle.org/master/scripts/deploy/deploy_docs.sh
D
daming-lu 已提交
28 29
    export BOOK_DIR=`pwd`
    cd ..
D
daming-lu 已提交
30
    curl $DEPLOY_DOCS_SH | bash -s $CONTENT_DEC_PASSWD $TRAVIS_BRANCH $BOOK_DIR
L
Luo Tao 已提交
31 32 33 34
notifications:
  email:
    on_success: change
    on_failure: always