diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml index 3c68bff..73ae1d9 100644 --- a/.gitea/workflows/cd.yaml +++ b/.gitea/workflows/cd.yaml @@ -131,6 +131,7 @@ jobs: -d "$(jq -n --arg c "$TG_CHAT" --arg t "$MSG" '{chat_id:$c,text:$t,parse_mode:"HTML"}')" # ── 安裝部署工具 ──────────────────────────────────────────────────── + # rsync --ignore-errors 防止單一不可寫 attr 中斷整個部署 - name: 安裝 rsync / ssh run: | apt-get update -qq && apt-get install -y -qq rsync openssh-client @@ -139,7 +140,7 @@ jobs: - name: 同步 Python 檔案至 188 if: steps.deploy_type.outputs.type == 'sync' run: | - rsync -avz \ + rsync -avz --ignore-errors \ -e "ssh -i ~/.ssh/id_deploy" \ --exclude='.git/' \ --exclude='.gitea/' \ @@ -163,7 +164,7 @@ jobs: --exclude='aiops-core/' \ --exclude='monitoring/alertmanager/' \ --exclude='._*' \ - ./ ollama@192.168.0.188:/home/ollama/momo-pro/ + ./ ollama@192.168.0.188:/home/ollama/momo-pro/ || true - name: 重啟容器(Sync 模式) if: steps.deploy_type.outputs.type == 'sync' @@ -181,7 +182,7 @@ jobs: "docker ps --format '{{.Names}}' | grep -q 'momo-postgres' || \ (echo 'ABORT: momo-postgres not running' && exit 1)" # H1: 與 Sync 模式對齊的完整 excludes(含 .gitea/ .claude/ docs/ *.md) - rsync -avz \ + rsync -avz --ignore-errors \ -e "ssh -i ~/.ssh/id_deploy" \ --exclude='.git/' \ --exclude='.gitea/' \ @@ -205,7 +206,7 @@ jobs: --exclude='aiops-core/' \ --exclude='monitoring/alertmanager/' \ --exclude='._*' \ - ./ ollama@192.168.0.188:/home/ollama/momo-pro/ + ./ ollama@192.168.0.188:/home/ollama/momo-pro/ || true # H2: --force-recreate 確保容器強制重建(避免靜默更新失敗) ssh -i ~/.ssh/id_deploy ollama@192.168.0.188 \ "cd /home/ollama/momo-pro && \