diff --git a/.github/workflows/springboot-on-push.yaml b/.github/workflows/springboot-on-push.yaml index eecf3321..4948b644 100644 --- a/.github/workflows/springboot-on-push.yaml +++ b/.github/workflows/springboot-on-push.yaml @@ -47,12 +47,12 @@ jobs: - name: SCP jar file to server run: | scp *jar ${{ secrets.SPRINGBOOT_USERNAME }}@${{ secrets.SPRINGBOOT_HOST_DNS }}:\ - ${{ secrets.SPRINGBOOT_TARGET_DIR }} + ${{ secrets.SPRINGBOOT_TARGET_DIR }}/build/libs working-directory: ./springboot/build/libs - name: Execute remote commands run: | - ssh -v ${{ secrets.SPRINGBOOT_USERNAME }}@${{ secrets.SPRINGBOOT_HOST_DNS }}\ + ssh -v ${{ secrets.SPRINGBOOT_USERNAME }}@${{ secrets.SPRINGBOOT_HOST_DNS }} \ "fuser -k 8080/tcp || true" - ssh -v ${{ secrets.SPRINGBOOT_USERNAME }}@${{ secrets.SPRINGBOOT_HOST_DNS }}\ + ssh -v ${{ secrets.SPRINGBOOT_USERNAME }}@${{ secrets.SPRINGBOOT_HOST_DNS }} \ "sudo nohup /usr/bin/java -jar ${{ secrets.SPRINGBOOT_TARGET_DIR }}/build/libs/*.jar\ > {{ secrets.SPRINGBOOT_TARGET_DIR }}/app.log 2>&1 &"