forked from actiontech/dble-docs-cn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (53 loc) · 1.21 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
55
56
57
dist: trusty
env:
global:
- GH_REF: github.com/actiontech/dble-docs-cn
- GH_USER: actiontech-bot
- GH_MAIL: github@actionsky.com
# 指定环境语言
language: node_js
# 指定sudo权限
sudo: required
# 指定node版本
node_js: v14.2.0
# 指定缓存模块,缓存可以加速编译
cache:
directories:
- node_modules
# 邮件通知
notifications:
email:
recipients:
- yanhuqing@actionsky.com
on_success: never # default: change
on_failure: always # default: always
# 构建的分支
branches:
only:
- master
- develop
# 调整时区
before_install:
- export TZ='Asia/Shanghai'
- sudo apt-get install -y calibre fonts-arphic-gbsn00lp
# 安装环境
install:
- npm install -g gitbook-cli
- npm install gitbook-plugin-yahei
- gitbook install
# gitbook生成静态文件
script:
- gitbook build
deploy:
# deploy develop to the staging environment
- provider: script
skip_cleanup: true
script: bash ./deploy.sh develop 1 ${GH_TOKEN} $TRAVIS_BUILD_NUMBER
on:
branch: develop
# deploy master to production
- provider: script
skip_cleanup: true
script: bash ./deploy.sh master 1 ${GH_TOKEN} $TRAVIS_BUILD_NUMBER
on:
branch: master