-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path_.travis.yml
39 lines (39 loc) · 1.23 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
language: node_js
node_js:
- '10'
before_install:
- openssl aes-256-cbc -K $encrypted_5aa0ff0f8511_key -iv $encrypted_5aa0ff0f8511_iv
-in id_rsa.enc -out id_rsa -d
- cd web
jobs:
include:
- stage: "Tests"
name: "Test in Chrome"
cache:
directories:
- node_modules
script:
- npm run travis-test
addons:
chrome: stable
- stage: "Build"
name: "Build in production"
cache:
directories:
- node_modules
script:
- npm run prod-build
after_success:
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then eval $(ssh-agent -s); fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then chmod 600 ../id_rsa; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ssh-add ../id_rsa; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ssh-keyscan -p ${port} ${addr} >> ~/.ssh/known_hosts; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ssh -p ${port} root@${addr} "rm -rf /opt/bside/httpd/htdocs/*"; fi'
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then scp -P ${port} -r dist/web/* root@${addr}:/opt/bside/httpd/htdocs; fi'
notifications:
email: false
branches:
only:
- master
dist: trusty
sudo: required