forked from vickyliin/lab-wiki
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
44 lines (37 loc) · 1.06 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
language: node_js
node_js:
- v6.11.2
before_install:
- if [[ `npm -v` != 5* ]]; then npm i -g npm@5; fi
install:
- npm install
script:
- npm run lint
- npm test
- npm run build
before_deploy:
- openssl aes-256-cbc -K $encrypted_e4f2476c205d_key -iv $encrypted_e4f2476c205d_iv
-in deploy_rsa.enc -out deploy_rsa -d
- ssh-keyscan -t rsa,ecdsa-sha2-nistp256 -p $DEPLOY_PORT $DEPLOY_HOST >> $HOME/.ssh/known_hosts
- eval "$(ssh-agent -s)"
- chmod 600 deploy_rsa
- ssh-add deploy_rsa
deploy:
- provider: script
skip_cleanup: true
script: rsync -rzv -e 'ssh -p $DEPLOY_PORT' static $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH
on:
branch: master
- provider: script
skip_cleanup: true
script: rsync -rzv -e 'ssh -p $DEPLOY_PORT' static $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH-beta
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^release.*$ || $TRAVIS_BRANCH =~ ^hotfix.*$
notifications:
email:
recipients:
- labwiki@nlg.csie.ntu.edu.tw
- vickyliinn@gmail.com
on_success: never
on_failure: always