Skip to content

Commit

Permalink
feat: 排查错误,文件夹文件删除了
Browse files Browse the repository at this point in the history
  • Loading branch information
devil committed Aug 2, 2024
1 parent d7e5993 commit 9a2ffdf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@ jobs:
- name: 打印仓库文件列表 📦
run: ls ${{ github.workspace }}

- name: 打包代码成 ZIP 文件 📦
id: deploy
run: |
zip -r publish.zip . -x "*.git*"
echo "::set-output name=zip-path::publish.zip"
- name: 查看 zip 文件 📦
run: ls
- name: 清空之前的旧文件夹
Expand All @@ -90,6 +84,14 @@ jobs:
SCRIPT_AFTER: |
cd /opt/app/test
rm -rf * # 删除目录下所有文件和子目录
- name: 打包代码成 ZIP 文件 📦
id: deploy
run: |
zip -r publish.zip . -x "*.git*"
echo "::set-output name=zip-path::publish.zip"
- name: 推送到测试服务器备份 zip 文件夹
uses: cross-the-world/ssh-scp-ssh-pipelines@latest
env:
Expand Down Expand Up @@ -121,8 +123,6 @@ jobs:
REMOTE_USER: ${{ secrets.DEV_SERVER_USER }}
REMOTE_HOST: ${{ secrets.DEV_SERVER_HOST }}
REMOTE_PORT: 22
# remote-path: /opt/app/test
# local-path: ./publish.zip
SCRIPT_AFTER: |
cd /opt/app/test
unzip publish.zip
Expand Down

0 comments on commit 9a2ffdf

Please sign in to comment.