Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
First try at fixing deploy system. Fixes #27.
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Oct 15, 2017
1 parent dc2897c commit cc1a0aa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
22 changes: 18 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,26 @@ services:
before_install:
- psql -c "create user simplevote with password 'asdf'" -U postgres
- psql -c "create database simplevote with owner simplevote" -U postgres
- cd service
after_success:
- cd ..
- ./deploy.sh
- cd ui; npm i -g @angular/cli; yarn; ng build -prod -aot;
- cp -R dist/ ../service/src/main/resources
- cd ../service
addons:
postgresql: '9.3'
apt:
packages:
- sshpass
deploy:
provider: releases
api_key:
secure: JorCWY30UiSI5DWIlDbhKX0zHp+vB4u0+8354jYYHGGmKUoY4DjbLtaJ8wwt52QmhEhPMNQxU1siS41kwGqgm0uLX6zH9BJTB5Nh/1EEkSuoKpY8GgnCsXX+gV+ic+yTFDpqavyP7Xru8I7OfQt62fbBNApDpOEPPLzLYdWb+ILbo1OoGKgEN2s4UyuVllEniqxAMcTZg5IwqCDuGW2bZxopYu9WdkQvpGYmvI3HR47AHpV40OEB1i5JmRBBNOuJTdeRoD9bw0DecL0hv5eY4IHA4evttUdZQ0m33bGM89/d5CKUpgOloJprVQTFfF0iazGX0maJG2PeJzHDxfYtDtEccFhY26EVPUJZAfw6Zx+LS2surHH3rxc+wF2wiRQ1YEu0PUuBK/3OoIFVEeCPGoLAgWfOYTSnhtlxozwOgdzLwwqjwp1yxJx+cVx67wBwNoz3zcEdObmzI/1FrU1A9UwZmi8ciI4cTheEbhQkzN+yiZFsSD0wfm+pahKABkuuVJbdKUUiFgNHvBYWmFcflnexrUQ4rBLDPFvanRHe0bRtI21Z/T0uT6yBf89Y3ksV5Lb+oxUCzQvbefhIpdr/yTRm8ihhTUDcpBkSd6ztelTR1GBQaLjDLKFqbeLZIItrlsz4sE60gUGMQHDdP7fPuWD4aK95EsdvjoKjLDRzB6E=
file:
- target/simplevote.jar
skip_cleanup: true
on:
repo: dessalines/simplevote
tags: true
before_deploy:
- echo $PWD
after_deploy:
- cd ..
- ./deploy.sh
7 changes: 3 additions & 4 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
if [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
export SSHPASS=$DEPLOY_PASS
sshpass -e ssh -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_HOST "source ~/.nvm/nvm.sh;cd ~/git/simple-vote;git checkout master;git pull;./install_prod.sh"
fi
export SSHPASS=$DEPLOY_PASS
sshpass -e ssh -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_HOST "./restart_simplevote.sh"

0 comments on commit cc1a0aa

Please sign in to comment.