From bfda353270d81a67274e5904b2a5808a63ed518e Mon Sep 17 00:00:00 2001 From: OG T Date: Wed, 25 Mar 2026 21:24:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E6=B8=85=E7=90=86=20.claude/worktre?= =?UTF-8?q?es=20=E9=98=B2=E6=AD=A2=20submodule=20=E9=8C=AF=E8=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 問題: Runner 上的 .claude/worktrees 被誤認為 submodule 解決: 在 checkout 前清理 worktrees 目錄 Co-Authored-By: Claude Opus 4.5 --- .github/workflows/cd.yaml | 5 +++++ .github/workflows/ci.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 9caf0f1f..490c393b 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -103,7 +103,12 @@ jobs: api: ${{ inputs.force_deploy == true && 'true' || steps.filter.outputs.api }} web: ${{ inputs.force_deploy == true && 'true' || steps.filter.outputs.web }} steps: + - name: Clean worktrees + run: rm -rf .claude/worktrees 2>/dev/null || true + - uses: actions/checkout@v4 + with: + clean: true - uses: dorny/paths-filter@v3 id: filter diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9f29acc3..77151097 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -44,7 +44,12 @@ jobs: needs: pre-flight timeout-minutes: 10 steps: + - name: Clean worktrees + run: rm -rf .claude/worktrees 2>/dev/null || true + - uses: actions/checkout@v4 + with: + clean: true - name: Setup pnpm uses: pnpm/action-setup@v3