-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.travis.yml
More file actions
44 lines (36 loc) · 870 Bytes
/
.travis.yml
File metadata and controls
44 lines (36 loc) · 870 Bytes
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
language: node_js
node_js:
- "8"
# 缓存依赖
cache:
directories:
- $HOME/.npm
before_install:
- export TZ='Asia/Shanghai' # 更改时区
# 依赖安装
install:
- npm install gitbook-cli -g
# 安装 gitbook 插件
- gitbook install
# 构建脚本
script:
# 自定义输出目录 gitbook build src dest
- gitbook build . ./build
# - gitbook build . ./build/$CUSTOM_PATH
# 分支白名单
branches:
only:
- master # 只对 master 分支进行构建
# GitHub Pages 部署
deploy:
provider: pages
skip_cleanup: true
# 在项目仪表盘的 Settings -> Environment Variables 中配置
github_token: $GITHUB_TOKEN
# 将 build 目录下的内容推送到默认的 gh-pages 分支上,并不会连带 build 目录一起
local_dir: build
#fqdn: $CUSTOM_DOMAIN
name: $GIT_NAME
email: $GIT_EMAIL
on:
branch: master