fix: agregado --exclude=mee al rsync de deploy para evitar wipe de SES Bounce Monitor
This commit is contained in:
+17
-11
@@ -15,8 +15,8 @@ echo ""
|
|||||||
|
|
||||||
# Build if dist doesn't exist or is stale
|
# Build if dist doesn't exist or is stale
|
||||||
if [ ! -d "$DIST" ] || [ "$REPO/package.json" -nt "$DIST" ]; then
|
if [ ! -d "$DIST" ] || [ "$REPO/package.json" -nt "$DIST" ]; then
|
||||||
echo "→ Building..."
|
echo "→ Building..."
|
||||||
npm run build --prefix "$REPO"
|
npm run build --prefix "$REPO"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy PHP endpoints into dist (they don't go through Astro)
|
# Copy PHP endpoints into dist (they don't go through Astro)
|
||||||
@@ -31,18 +31,24 @@ cp "$REPO/scripts/htaccess.conf" "$DIST/.htaccess"
|
|||||||
# cPanel recognizes 404.shtml specifically (Server-Side Includes)
|
# cPanel recognizes 404.shtml specifically (Server-Side Includes)
|
||||||
# Astro generates 404.html — duplicate as .shtml for cPanel
|
# Astro generates 404.html — duplicate as .shtml for cPanel
|
||||||
if [ -f "$DIST/404.html" ]; then
|
if [ -f "$DIST/404.html" ]; then
|
||||||
cp "$DIST/404.html" "$DIST/404.shtml"
|
cp "$DIST/404.html" "$DIST/404.shtml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# rsync with --delete to mirror (preserva mwp/, .well-known/, etc.)
|
# Extract shared design-system partials for WordPress /blog/
|
||||||
|
bash "$REPO/scripts/build-design-system.sh"
|
||||||
|
|
||||||
|
# rsync with --delete to mirror
|
||||||
|
# Preserve: mwp/, mee/ (SES Bounce Monitor), .well-known/, blog/ (WP), design-system/ (shared), smtp creds
|
||||||
rsync -avz --delete \
|
rsync -avz --delete \
|
||||||
--exclude='mwp' \
|
--exclude='mwp' \
|
||||||
--exclude='.well-known' \
|
--exclude='mee' \
|
||||||
--exclude='.smtp-credentials.json' \
|
--exclude='.well-known' \
|
||||||
-e ssh \
|
--exclude='.smtp-credentials.json' \
|
||||||
"$DIST/" \
|
--exclude='blog' \
|
||||||
"$REMOTE:$REMOTE_PATH/"
|
-e ssh \
|
||||||
|
"$DIST/" \
|
||||||
|
"$REMOTE:$REMOTE_PATH/"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Verificación ==="
|
echo "=== Verificación ==="
|
||||||
ssh $REMOTE "ls -la /home/hostingd/public_html/api/ && echo '---' && ls /home/hostingd/public_html/mwp/ | head -3"
|
ssh $REMOTE "ls -la /home/hostingd/public_html/api/ && echo '---' && ls /home/hostingd/public_html/mwp/ | head -3 && echo '---' && ls /home/hostingd/public_html/design-system/ | head -10"
|
||||||
|
|||||||
Reference in New Issue
Block a user