devops各步骤使用中文

This commit is contained in:
hxuanyu 2024-11-04 18:03:20 +08:00
parent e5471c27dc
commit 77fe8be4a6

View File

@ -45,5 +45,16 @@ jobs:
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_PORT }}
source: "target/*.jar"
target: "/home/tools/testActions"
source: target/*.jar
target: /home/tools/${{ var.APP_NAME }}/package
# 停止远程服务进程
- name: 使用新版jar包启动应用
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_PORT }}
script: |
"if screen -list | grep -q '${{ var.APP_NAME }}'; then screen -S ${{ var.APP_NAME }} -X quit && echo 'Screen session PetGuardian stopped.'; else echo 'No screen session named PetGuardian found.'; fi"
screen -dmS PetGuardian /usr/local/java/jdk1.8.0_202/bin/java -jar ${{ var.APP_NAME }}-0.0.1-SNAPSHOT.jar