Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
woody35545 authored Apr 27, 2024
1 parent e33a81b commit e7fd791
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@ jobs:
${{ SECRETS.PREPARE_SKM_KEY }}
${{ SECRETS.PREPARE_INSTANCE_KEY }}
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn ${{ secrets.MAVEN_PACKAGE_OPTIONS }}
# - name: Set up JDK 11
# uses: actions/setup-java@v3
# with:
# java-version: '11'
# distribution: 'temurin'
# cache: maven
# - name: Build with Maven
# run: mvn ${{ 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 : 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: "kill $(lsof -i:${{ secrets.APPLICATION_PORT }} -t) & nohup java -jar ${{ secrets.JAVA_RUN_OPTION }} ~/target/*.jar > ~/deploy.log 2>&1 &"
# - 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: "kill $(lsof -i:${{ secrets.APPLICATION_PORT }} -t) & nohup java -jar ${{ secrets.JAVA_RUN_OPTION }} ~/target/*.jar > ~/deploy.log 2>&1 &"

0 comments on commit e7fd791

Please sign in to comment.