ci(deploy): treat src/public/package changes as FULL rebuild #191

Merged
Archicratia merged 1 commits from chore/fix-deploy-gate-full-src-public-20260304-181357 into main 2026-03-04 17:16:31 +00:00

View File

@@ -159,16 +159,32 @@ jobs:
HAS_FULL=0
HAS_HOTPATCH=0
# FULL si build-impacting (ce que tu veux : content/anchors/pages/scripts)
if grep -qE '^(src/content/|src/anchors/|src/pages/|scripts/)' /tmp/changed.txt; then
HAS_FULL=1
fi
# HOTPATCH si annotations/media touchés
if grep -qE '^(src/annotations/|public/media/)' /tmp/changed.txt; then
HAS_HOTPATCH=1
fi
# FULL si build-impacting (robuste)
# 1) Tout src/ SAUF src/annotations/
if grep -qE '^src/' /tmp/changed.txt && grep -qEv '^src/annotations/' /tmp/changed.txt; then
HAS_FULL=1
fi
# 2) scripts/
if grep -qE '^scripts/' /tmp/changed.txt; then
HAS_FULL=1
fi
# 3) Tout public/ SAUF public/media/
if grep -qE '^public/' /tmp/changed.txt && grep -qEv '^public/media/' /tmp/changed.txt; then
HAS_FULL=1
fi
# 4) fichiers racine qui changent le build / limage
if grep -qE '^(package\.json|package-lock\.json|astro\.config\.mjs|tsconfig\.json|\.npmrc|\.nvmrc|Dockerfile|docker-compose\.yml|nginx\.conf)$' /tmp/changed.txt; then
HAS_FULL=1
fi
echo "Gate flags: HAS_FULL=${HAS_FULL} HAS_HOTPATCH=${HAS_HOTPATCH}"
# Décision