-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
44 lines (32 loc) · 872 Bytes
/
.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
language: node_js
node_js: 10
sudo: required
# 使用安全列表指定要构建的分支
branches:
only:
- dev
# Travis-CI Caching
cache:
directories:
- node_modules
before_install:
- sudo apt-get update
- sudo apt-get install sshpass
script:
- npm install -g vuepress
- npm i
- npm run build
addons:
ssh_known_hosts:
- $HOST
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- docker build -t registry.cn-qingdao.aliyuncs.com/zealsay/zealsay_docs:latest .
- docker push registry.cn-qingdao.aliyuncs.com/zealsay/zealsay_docs:latest;
- sshpass -p $VPS_PASSWORD ssh -o stricthostkeychecking=no travis@$HOST "/home/zeal/docker/zealsay/deploy-docs.sh"
notifications:
email:
recipients:
on_success: change # default: change
on_failure: always # default: always