-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy path.travis.yml
More file actions
38 lines (33 loc) · 919 Bytes
/
.travis.yml
File metadata and controls
38 lines (33 loc) · 919 Bytes
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
language: node_js
node_js:
- '10'
cache:
directories:
- "$HOME/.npm"
- node_modules
before_install:
- openssl aes-256-cbc -K $encrypted_ec767382cef6_key -iv $encrypted_ec767382cef6_iv
-in deploy_key.enc -out ./deploy_key -d
- eval "$(ssh-agent -s)"
- chmod 600 ./deploy_key
- echo -e "Host $HOST\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- ssh-add ./deploy_key
- nvm install 'lts/*'
- npm i -g npm
install:
- npm install --no-audit --no-progress --quiet
- cp URL.js.develop src/constants/URLs.js
- npm run pack
after_success:
- tar -czf package.tgz dist
- scp -o stricthostkeychecking=no -P $PORT -i ./deploy_key package.tgz $DEPLOY_USER@$HOST:$DEPLOY_PATH/
- ssh -o stricthostkeychecking=no -p $PORT -i ./deploy_key $DEPLOY_USER@$HOST <<'ENDSSH'
tar -xvzf package.tgz
cp -R dist/* public_html/
rm -R dist
rm package.tgz
ENDSSH
notifications:
email:
on_success: never
on_failure: always