diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 74e39922..0d0f7c14 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -63,10 +63,10 @@ jobs: key: ${{ secrets.NCP_PEM }} port: 22 script: | - CURRENT_PID=$(pgrep -f java) + CURRENT_PID=$(pgrep -fl app | grep java | awk '{print $1}' ) if [ -z "$CURRENT_PID" ]; then echo "> no applcation named java is running" - else + else echo "> kill -9 java" kill -9 $CURRENT_PID sleep 5