Fix preview deploy without root htaccess

This commit is contained in:
Clément SAILLANT
2026-03-14 17:40:50 +00:00
parent 4a1d3a2c18
commit 58f8011657
2 changed files with 20 additions and 0 deletions
+7
View File
@@ -63,6 +63,13 @@ main() {
echo "[deploy-ovh-ftp-target] Skipping build:external (already built)."
fi
# The root .htaccess contains root-scoped Apache rules (`/index.html`, `/_astro/`)
# that break the preview when uploaded inside `/preview`.
if [[ "$TARGET" == "preview" && -f "${LOCAL_DIR}/.htaccess" ]]; then
echo "[deploy-ovh-ftp-target] Removing .htaccess from preview payload."
rm -f "${LOCAL_DIR}/.htaccess"
fi
bash scripts/deploy-ovh-ftp.sh "$LOCAL_DIR"
}