From 4a0041efd58703d5ccd218117c60274841be6407 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 11 Feb 2026 16:31:59 +0000 Subject: [PATCH] ci: clean all sibling dirs before copying to fix stale table defs Previous runs left self-copies (e.g. events/events/) that caused 'Table already defined' errors. Split into two loops: first rm -rf all sibling dirs, then copy only non-self siblings. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index c52640f..41fceee 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -39,10 +39,13 @@ jobs: git fetch origin ${{ github.ref_name }} git reset --hard origin/${{ github.ref_name }} git submodule update --init --recursive - # Copy sibling app models for cross-domain imports (skip self to avoid duplicate table defs) + # Clean ALL sibling dirs (including stale self-copies from previous runs) + for sibling in blog market cart events; do + rm -rf \$sibling + done + # Copy non-self sibling models for cross-domain imports for sibling in blog market cart events; do [ \"\$sibling\" = \"${{ env.IMAGE }}\" ] && continue - rm -rf \$sibling/__init__.py \$sibling/models repo=/root/rose-ash/\$sibling if [ -d \$repo/.git ]; then git -C \$repo fetch origin ${{ github.ref_name }} 2>/dev/null || true