ci: clean all sibling dirs before copying to fix stale table defs
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 2m20s

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 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-11 16:31:59 +00:00
parent b2aa657d70
commit 4a0041efd5

View File

@@ -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