-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.travis.yml
More file actions
32 lines (32 loc) · 787 Bytes
/
.travis.yml
File metadata and controls
32 lines (32 loc) · 787 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
language: node_js
node_js:
- 9.0.0
sudo: false
addons:
ssh_known_hosts: "$HOST"
install:
- npm install -g npm@5
- npm install
before_deploy:
- npm run build-prod
- openssl aes-256-cbc -K $encrypted_efb8a7f7bc43_key -iv $encrypted_efb8a7f7bc43_iv
-in deploy_key.pem.enc -out deploy_key.pem -d
- eval "$(ssh-agent -s)"
- chmod 600 deploy_key.pem
- ssh-add deploy_key.pem
deploy:
provider: script
skip_cleanup: true
script:
- scp -o "StrictHostKeyChecking no" -r $TRAVIS_BUILD_DIR/dist $USER@$HOST:/root
on:
branch: master
after_deploy:
- ssh -o "StrictHostKeyChecking no" $USER@$HOST "bash -s" < deploy.sh
- eval "$(ssh-agent -k)"
- echo "Killed SSH Agent"
- rm -rf deploy_key.pem
after_failure:
- eval "$(ssh-agent -k)"
- echo "Killed SSH Agent"
- rm -rf deploy_key.pem