Skip to content

Commit

Permalink
Update CD.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchef1 authored May 9, 2024
1 parent 57168a8 commit c226e5e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,5 @@ jobs:

- name: Deploy to EC2
run: |
ssh-keygen -R ${{ secrets.EC2_HOST }}
sshpass -p ${{ secrets.EC2_PASSWORD }} scp build/libs/sanbosillokserver-0.0.1-SNAPSHOT.jar ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }}:/home/${{ secrets.EC2_USERNAME }}/Sanbo-Sillok-Server.jar
sshpass -p ${{ secrets.EC2_PASSWORD }} ssh ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }} "pgrep java | xargs kill -9; nohup java -jar sanbosillokserver-0.0.1-SNAPSHOT.jar &"
sshpass -p ${{ secrets.EC2_PASSWORD }} scp build/libs/sanbosillokserver-0.0.1-SNAPSHOT.jar ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }}:/home/${{ secrets.EC2_USERNAME }}/
sshpass -p ${{ secrets.EC2_PASSWORD }} ssh -T -o StrictHostKeyChecking=no ${{ secrets.EC2_USERNAME }}@${{ secrets.EC2_HOST }} "pgrep java | xargs kill -9; nohup java -jar sanbosillokserver-0.0.1-SNAPSHOT.jar &"

0 comments on commit c226e5e

Please sign in to comment.