Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
eneoli committed Sep 5, 2024
1 parent 0c020d3 commit 49ad976
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ echo "$SSH_KEY" > ~/.ssh/deploy.key
sudo chmod 600 ~/.ssh/deploy.key
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts

rm -rf dist.zip
zip -r dist.zip dist/

ssh -i ~/.ssh/deploy.key $DEPLOYMENT_USER@$DEPLOYMENT_SERVER "rm -rf $DEPLOYMENT_RES_PATH/*"
scp -i ~/.ssh/deploy.key -r dist $DEPLOYMENT_USER@$DEPLOYMENT_SERVER:$DEPLOYMENT_RES_PATH
scp -i ~/.ssh/deploy.key dist.zip $DEPLOYMENT_USER@$DEPLOYMENT_SERVER:$DEPLOYMENT_RES_PATH
ssh -i ~/.ssh/deploy.key $DEPLOYMENT_USER@$DEPLOYMENT_SERVER "unzip $DEPLOYMENT_RES_PATH/dist.zip && mv dist/* ../ && rm -rf dist/ && rm -rf dist.zip"

echo -e "\033[1;32m"
echo "Done ^-^"
Expand Down

0 comments on commit 49ad976

Please sign in to comment.