forked from imcoddy/rebirth-of-bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
58 lines (47 loc) · 1.19 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
58
# 指定环境语言
language: node_js
# 指定sudo权限
sudo: required
# 指定node版本
node_js: stable
# 指定缓存模块,缓存可以加速编译
cache:
directories:
- node_modules
# 邮件通知,这里配置不管成功或是失败都通知
notifications:
email:
recipients:
on_success: always # default: change
on_failure: always # default: always
# 构建的分支
branches:
only:
- develop
# 调整时区
before_install:
- export TZ='Asia/Shanghai'
# 安装环境
install:
- npm install -g gitbook-cli
- gitbook install
# gitbook生成静态文件
script:
- gitbook build
# 发布静态文件
after_script:
- cd ./_book
- git init
- git config user.name "imcoddy"
- git config user.email "[email protected]"
- echo "metanet.press" > CNAME
- git add .
- git commit -m "Update GitBook By TravisCI With Build $TRAVIS_BUILD_NUMBER"
- git remote add origin https://${REPO}
- git push --force --quiet "https://${GH_TOKEN}@${REPO}" master:gh-pages
# 环境变量
env:
global:
# Github Pages
- REPO: github.com/imcoddy/rebirth-of-bitcoin.git