Skip to content

Commit c034b29

Browse files
committed
fix(deploy):修复部署脚本中
Signed-off-by: LiggMax <wenzhouli06@gmail.com>
1 parent 9c204a6 commit c034b29

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,27 +39,17 @@ jobs:
3939
restart.sh
4040
target: "${{ secrets.SERVER_PROJECT_PATH }}"
4141

42-
# 设置 restart.sh 权限
43-
- name: Set permissions for restart.sh
42+
# 执行 restart.sh
43+
- name: perform restart.sh
4444
uses: appleboy/ssh-action@v1.1.0
4545
with:
4646
host: ${{ secrets.SERVER_HOST }}
4747
username: ${{ secrets.SERVER_USER }}
4848
port: ${{ secrets.SERVER_PORT }}
4949
key: ${{ secrets.SERVER_SSH_KEY }}
5050
script: |
51-
chmod 755 ${{ secrets.SERVER_PROJECT_PATH }}restart.sh
52-
53-
# 调用服务器的 restart.sh 重启项目
54-
- name: Restart Spring Boot app
55-
uses: appleboy/ssh-action@v1.1.0
56-
with:
57-
host: ${{ secrets.SERVER_HOST }}
58-
username: ${{ secrets.SERVER_USER }}
59-
port: ${{ secrets.SERVER_PORT }}
60-
key: ${{ secrets.SERVER_SSH_KEY }}
61-
script: |
6251
cd ${{ secrets.SERVER_PROJECT_PATH }}
52+
chmod 755 restart.sh
6353
# 获取最新 jar 文件名
6454
LATEST_JAR=$(ls -t *.jar | head -n 1)
6555
echo "最新 jar 包:$LATEST_JAR"
@@ -69,4 +59,4 @@ jobs:
6959
sed -i "s|^APP_PATH=.*|APP_PATH=\"${{ secrets.SERVER_PROJECT_PATH }}\"|" restart.sh
7060
7161
echo "执行重启脚本..."
72-
bash -l restart.sh
62+
bash -l restart.sh

0 commit comments

Comments
 (0)