Skip to content

Commit

Permalink
Update server_cicd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Imsyp authored Sep 20, 2024
1 parent bbaeee9 commit fcca82b
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/server_cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ jobs:
cd server
./gradlew build -x test
- name: Deploy
if: success()
run: echo "Deploy your application here"
- name: Deploy to GCP VM
if: success()
uses: appleboy/ssh-action@v0.1.3
with:
host: ${{ secrets.GCP_SERVER_VM_HOST }}
username: ${{ secrets.GCP_SERVER_VM_USER }}
key: ${{ secrets.GCP_SERVER_SSH_PRIVATE_KEY }}
port: 22
script: |
cd /home/patturning1/deployment
pkill -f swdc-0.0.1-SNAPSHOT.jar
rm -rf /home/patturning1/deployment/*
scp -r ./server/build/libs/* patturning1@34.47.71.246:/home/patturning1/deployment/
nohup java -jar swdc-0.0.1-SNAPSHOT.jar &

0 comments on commit fcca82b

Please sign in to comment.