-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.travis.yml
52 lines (44 loc) · 1.71 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
language: node_js
node_js:
- "10"
cache: npm
# notifications:
# email:
# recipients:
# - [email protected] # 设置通知邮件
# on_success: change
# on_failure: always
install:
- npm install -g gitbook-cli
- gitbook install
script:
- cd docs # into /docs folder
- gitbook install # install plugins
- gitbook build
after_script:
- cd _book
- git init
- git remote add origin https://${GH_REF}
# - git config user.name "yubuntu0109"
# - git config user.email "[email protected]"
- git add .
- git commit -m ":rocket:Updated By Travis-CI With Build $TRAVIS_BUILD_NUMBER For Github Pages"
- git push --force --quiet "https://${GOOGTECH_TOKEN}@${GH_REF}" master:gh-pages
branches:
only:
- master
env:
global:
- GH_REF: github.com/GoogTech/leetcode.git # 设置 github 地址
#---------------------------------------------------------------------------------------------------------
# 参考博文如下所示 :
# <Travis CI持续集成 GitHub 个人博客> : https://www.jianshu.com/p/9d056d5ba78e
# <使用 travis + gitbook + github pages 优雅地发布自己的书> : https://segmentfault.com/a/1190000018002602
#
#
# 注意 GOOGTECH_TOKEN 的命令规范,如果含有特殊字符需要加入转字符哟( 符号 "_" 不是特殊字符 )
# 否则 Travis 控制台会抛出如下异常信息( 符号 "-" 属于特殊字符哟 ) :
# $ git push --force --quiet "https://${LEETCODE-GOOGTECH-TOKEN}@${GH_REF}" master:gh-pages
# remote: Invalid username or password.
# fatal: Authentication failed for 'https://[email protected]/YUbuntu0109/leetcode-googtech.git/'
#---------------------------------------------------------------------------------------------------------