diff --git a/.github/workflows/server_cicd.yml b/.github/workflows/server_cicd.yml index 5d02090..d3b94bc 100644 --- a/.github/workflows/server_cicd.yml +++ b/.github/workflows/server_cicd.yml @@ -34,19 +34,17 @@ jobs: if: success() uses: appleboy/ssh-action@v0.1.3 with: - timeout: 120s - command_timeout: 120s debug: true 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 -15 -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 & + cd /home/patturning1/Dark-Pattern-Detection-SWDeveloperContest/server + sudo docker stop swdc-container || true + sudo docker rm swdc-container || true + sudo docker build -t swdc-app . + sudo docker run -d -p 8080:8080 --name swdc-container swdc-app