From 0160d724675136d322996ab0e755d07d14480edc Mon Sep 17 00:00:00 2001 From: Hank Date: Fri, 29 May 2026 03:00:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20CI=20=E4=B8=A6?= =?UTF-8?q?=E7=99=BC=20fetch=20=E5=B0=8E=E8=87=B4=20git=20ref=20=E8=A1=9D?= =?UTF-8?q?=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git pull 改為 flock + fetch + reset --hard: - flock 防止兩次 CI 同時更新 ref 產生 race condition - reset --hard 比 pull 更適合 CI 環境,不做 merge Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 1cc0f86..8d3804a 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -12,7 +12,8 @@ jobs: - name: Pull latest code run: | cd /root/myproject/CFDivePlatform - git pull + flock -w 30 /tmp/cfdive-deploy.lock git fetch origin + git reset --hard origin/master - name: Install Composer dependencies run: |