From a7984c58e52f8214fe4554c9754fd4868c67d25c Mon Sep 17 00:00:00 2001 From: thisiswooyeol Date: Tue, 21 Nov 2023 00:46:01 +0900 Subject: [PATCH] fix --- .github/workflows/springboot-on-push.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/springboot-on-push.yaml b/.github/workflows/springboot-on-push.yaml index 42a67cf5..7636f044 100644 --- a/.github/workflows/springboot-on-push.yaml +++ b/.github/workflows/springboot-on-push.yaml @@ -52,7 +52,7 @@ jobs: - name: Execute remote commands run: | ssh -v ${{ secrets.SPRINGBOOT_USERNAME }}@${{ secrets.SPRINGBOOT_HOST_DNS }} \ - "pkill -f 'java -jar ${{ secrets.SPRINGBOOT_TARGET_DIR }}/*.jar' || true && \ + "sudo lsof -t -i tcp:8080 | sargs sudo kill -9 || true && \ cd ${{ secrets.SPRINGBOOT_ROOT_DIR }} && pwd && \ sudo nohup /usr/bin/java -jar ${{ secrets.SPRINGBOOT_TARGET_DIR }}/*.jar \ > ${{ secrets.SPRINGBOOT_ROOT_DIR }}/app.log 2>&1 &"