Skip to content

Commit fdd72b1

Browse files
authored
Modify deployment target and cleanup in workflow
Updated deployment target path and added cleanup commands.
1 parent 50d9d49 commit fdd72b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ jobs:
4343
key: ${{ secrets.SSH_PRIVATE_KEY }}
4444
port: ${{ secrets.SSH_PORT }}
4545
source: "dist/*" # Vue默认输出目录,根据实际情况调整
46-
target: "/home/srv/tmphr" # 服务器目标路径
46+
target: "/home/gh_ations_hr/tmphr" # 服务器目标路径
4747
strip_components: 1 # 移除dist/前缀
4848
overwrite: true
49+
rm: true
4950

5051
- name: Deploy to Server
5152
uses: appleboy/ssh-action@v1
@@ -58,4 +59,6 @@ jobs:
5859
# 在远程服务器上执行的命令
5960
cd ~
6061
date >> ations.log
62+
rm -r /home/src/tmphr/*
63+
mv ~/tmphr/* /home/src/tmphr/*
6164
# ... 其他部署命令 ...

0 commit comments

Comments
 (0)