forked from xCss/Valine-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (43 loc) · 1.05 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
language: node_js
# nodejs版本
node_js: 8.6.0
# Travis-CI Caching
cache:
apt: true
directories:
- node_modules
before_install:
- export TZ='Asia/Shanghai' # 更改时区
# S: Build Lifecycle
install:
- npm install
before_script:
script:
- hexo clean #清除
- hexo g
after_script:
- mv .circleci ./public
- cd ./public
- git init
- git config user.name "${U_NAME}"
- git config user.email "${U_EMAIL}"
- git add .
- git commit -m "Travis CI Auto Builder Docs at `date +"%Y-%m-%d %H:%M"`"
- git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:${P_BRANCH}
# E: Build LifeCycle
#指定分支,只有指定的分支提交时才会运行脚本
branches:
only:
- master
env:
global:
# 我将其添加到了travis-ci的环境变量中
#- GH_REF: github.com/yimogit/metools.git
# configure notifications (email, IRC, campfire etc)
# please update this section to your needs!
# https://docs.travis-ci.com/user/notifications/
notifications:
email:
- xiove@qq.com
on_success: change
on_failure: always