Enhance deployment script with build validation checks
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 49s

Add checks to verify the success of the build process in deploy-production.sh. Implement error messages for missing critical files and directories, improving error handling and providing clear feedback during deployment. This update aims to ensure a successful build before proceeding with production data restoration.
This commit is contained in:
Torsten Schulz (local)
2026-01-08 07:47:27 +01:00
parent f1cf06ca48
commit f05d47be4c
2 changed files with 20 additions and 2 deletions

View File

@@ -145,6 +145,21 @@ echo ""
echo "5. Building application..."
npm run build
# Prüfe, ob der Build erfolgreich war
if [ ! -d ".output/public/_nuxt" ]; then
echo "ERROR: Build fehlgeschlagen - .output/public/_nuxt Verzeichnis fehlt!"
echo "Bitte prüfen Sie die Build-Ausgabe auf Fehler."
exit 1
fi
# Prüfe, ob wichtige Dateien vorhanden sind
if [ ! -f ".output/server/index.mjs" ]; then
echo "ERROR: Build fehlgeschlagen - .output/server/index.mjs fehlt!"
exit 1
fi
echo " Build erfolgreich - .output/public/_nuxt vorhanden"
# 6. Restore Production Data (überschreibe Repo-Defaults mit Backup)
echo ""
echo "6. Restoring production data..."