diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 4cc7867..f497912 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -25,3 +25,24 @@ jobs: - name: Build with Maven run: mvn package ${{ secrets.MAVEN_PACKAGE_OPTIONS }} + + - name : upload file + uses: appleboy/scp-action@master + with: + host: ${{ secrets.SSH_IP }} + username: ${{ secrets.SSH_ID }} + key: ${{ secrets.SSH_KEY }} + port: ${{ secrets.SSH_PORT }} + source: "target/*.jar" + target: "~/" + rm: false + + - name: execute shell script + uses: appleboy/ssh-action@master + with: + host: ${{ secrets.SSH_IP }} + username: ${{ secrets.SSH_ID }} + key: ${{ secrets.SSH_KEY }} + port: ${{ secrets.SSH_PORT }} + script_stop: true + script: "./startup.sh"