-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
33 lines (27 loc) · 933 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
language: node_js
node_js:
- 10.14.1
cache:
bundler: true
yarn: true
directories:
- node_modules
before_install:
- openssl aes-256-cbc -K $encrypted_95f09924c9e9_key -iv $encrypted_95f09924c9e9_iv -in id_rsa.enc -out ~/.ssh/id_rsa -d
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host $PRODUCTION_SERVER\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
- export PATH="$HOME/.yarn/bin:$PATH"
before_script:
- yarn install
script:
- yarn run test
deploy:
- provider: script
skip_cleanup: true
script:
ssh -p $PORT $USER@$PRODUCTION_SERVER 'cd /var/www/mahoo && git pull' &&
ssh -p $PORT $USER@$PRODUCTION_SERVER 'cd /var/www/mahoo && yarn' &&
ssh -p $PORT $USER@$PRODUCTION_SERVER 'cd /var/www/mahoo && pm2 reload pm2.config.js --env=production -i max —max-memory-restart 400M'
on:
branch: master