Skip to content

Commit

Permalink
feat(CI): update deploy command to support deployment via ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderrudnik committed Jan 11, 2019
1 parent 53fcfa0 commit f35ae77
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,9 @@ jobs:
DEPLOY_PATH: /var/www/html/vuestic-admin
command: |
tar -czf dist.tar.gz ~/repo/dist -C ~/repo/dist .
sudo apt install sshpass
ssh-keyscan -t rsa $SERVER_IP >> ~/.ssh/known_hosts
sshpass -p $SERVER_PASS scp ~/repo/dist.tar.gz $SERVER_USER_NAME@$SERVER_IP:~/
sshpass -p $SERVER_PASS ssh $SERVER_USER_NAME@$SERVER_IP << EOF
scp ~/repo/dist.tar.gz $SERVER_USER_NAME@$SERVER_IP:~/
ssh $SERVER_USER_NAME@$SERVER_IP << EOF
mkdir -p tmp
rm -rf $DEPLOY_PATH/*
tar -xzf ~/dist.tar.gz -C $DEPLOY_PATH
Expand Down

0 comments on commit f35ae77

Please sign in to comment.