-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (45 loc) · 1.29 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
#设置语言
language: node_js
#设置相应的版本
node_js: stable
# 缓存不经常更改的内容
cache:
apt: true
directories:
- node_modules
# 更改时区
before_install:
- export TZ='Asia/Shanghai'
# command to install dependencies
install:
- npm install
# command to run tests
script:
- npm install request
- node tool.js
after_script:
# GH_REF是最下面配置的仓库地址
- git clone https://${GH_REF}
- git checkout source
- cd ./resources
- git config user.name "Hosiang1026"
- git config user.email "hosiang1026@sina.com"
- git init
- git add .
- git commit -m " TravisCI第 $TRAVIS_BUILD_NUMBER 次自动构建发布相册图床中-`date +"%Y-%m-%d %H:%M"`"
# Github Pages
- git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:master
# Coding Pages
- git push --force --quiet "https://Hosiang1026:${CO_TOKEN}@${CO_REF}" master:master
- git tag v0.0.$TRAVIS_BUILD_NUMBER -a -m "发布成功 v0.0.$TRAVIS_BUILD_NUMBER"
branches:
only:
- source
# 配置Webhook通知
# notifications:
# webhooks: https://oapi.dingtalk.com/robot/send?access_token=6d3354513b93c853cd0250984784bd023de87449122f1bbae431e0b9030c81ab
# on_success: change
# on_failure: always
# on_start: change
# on_cancel: always
# on_error: always