deploy: erase twig cache before rsyncing files

This commit is contained in:
E. S. 2025-04-13 21:15:23 +03:00
parent b7d83ef8fe
commit 80c40fcee8

View File

@ -44,6 +44,11 @@ $PHP "$DIR"/gen_static_config.php -i "$STAGING_DIR/htdocs" > "$STAGING_DIR/confi
cd "$DIR"
TWIG_CACHE_DIR=$(grep 'skin_cache_prod_dir:' "$DEV_DIR/config.yaml" | sed 's/.*skin_cache_prod_dir: *//' | tr -d '[:space:]')
if [ -d "TWIG_CACHE_DIR" ]; then
find "$TWIG_CACHE_DIR" -maxdepth 1 -not -path "$TWIG_CACHE_DIR" -exec rm -rf {} +
fi
# copy staging to prod
rsync -a --delete --delete-excluded --info=progress2 "$STAGING_DIR/" "$PROD_DIR/" \
--exclude .git \