fix(cd): 使用 inplace rsync 保留 bind mount inode

This commit is contained in:
OoO
2026-04-30 23:32:59 +08:00
parent d06c7016dc
commit 73c7ddcee0
3 changed files with 5 additions and 0 deletions

View File

@@ -135,6 +135,7 @@ jobs:
# ── 安裝部署工具 ────────────────────────────────────────────────────
# rsync --ignore-errors 防止單一不可寫 attr 中斷整個部署
# rsync --inplace 避免 app.py/config.py 單檔 bind mount 因 inode replacement 卡住舊版本
- name: 安裝 rsync / ssh
run: |
apt-get update -qq && apt-get install -y -qq rsync openssh-client
@@ -144,6 +145,7 @@ jobs:
if: steps.deploy_type.outputs.type == 'sync'
run: |
rsync -avz --ignore-errors \
--inplace \
-e "ssh -i ~/.ssh/id_deploy" \
--exclude='.git/' \
--exclude='.gitea/' \
@@ -203,6 +205,7 @@ REMOTE_SYNC
(echo 'ABORT: momo-db not running' && exit 1)"
# H1: 與 Sync 模式對齊的完整 excludes含 .gitea/ .claude/ docs/ *.md
rsync -avz --ignore-errors \
--inplace \
-e "ssh -i ~/.ssh/id_deploy" \
--exclude='.git/' \
--exclude='.gitea/' \