forked from apachecn/pytorch-doc-zh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (34 loc) · 1.01 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
language: node_js # 构建所需的语言环境
node_js:
- "v10.16.0" # 对应的版本
branches:
only:
- master # 构建的分支
cache:
directories:
- node_modules # 依赖缓存的目录
- docs/0.2/node_modules # 依赖缓存的目录
- docs/0.3/node_modules # 依赖缓存的目录
- docs/0.4/node_modules # 依赖缓存的目录
- docs/1.0/node_modules # 依赖缓存的目录
- docs/LatestChanges/node_modules # 依赖缓存的目录
install:
- npm install -g gitbook-cli # 安装编译工具
- gitbook fetch 3.2.3 # 安装 Gitbook 子版本
script:
- sh run_website.sh
after_script:
- cd _book
- git init
- git config user.name ${GH_UN}
- git config user.email ${GH_EMAIL}
- git add -A
- git commit -am "$(date "+%Y-%m-%d %H:%M:%S")"
- git push "https://${GH_TOKEN}@github.com/${GH_USER}/${GH_REPO}.git" master:${GH_BRANCH} -f
env:
global:
- GH_UN=jiangzhonglian
- GH_EMAIL=jiang-s@163.com
- GH_USER=apachecn
- GH_REPO=pytorch-doc-zh
- GH_BRANCH=gh-pages