diff --git a/scripts/deploy.sh b/scripts/deploy.sh index d3e747c..a1f100b 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -15,8 +15,8 @@ echo "" # Build if dist doesn't exist or is stale if [ ! -d "$DIST" ] || [ "$REPO/package.json" -nt "$DIST" ]; then - echo "→ Building..." - npm run build --prefix "$REPO" + echo "→ Building..." + npm run build --prefix "$REPO" fi # 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) # Astro generates 404.html — duplicate as .shtml for cPanel if [ -f "$DIST/404.html" ]; then - cp "$DIST/404.html" "$DIST/404.shtml" + cp "$DIST/404.html" "$DIST/404.shtml" 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 \ - --exclude='mwp' \ - --exclude='.well-known' \ - --exclude='.smtp-credentials.json' \ - -e ssh \ - "$DIST/" \ - "$REMOTE:$REMOTE_PATH/" + --exclude='mwp' \ + --exclude='mee' \ + --exclude='.well-known' \ + --exclude='.smtp-credentials.json' \ + --exclude='blog' \ + -e ssh \ + "$DIST/" \ + "$REMOTE:$REMOTE_PATH/" echo "" 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"