27 lines
725 B
Bash
Executable File
27 lines
725 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "🚀 Starting Deployment..."
|
|
|
|
# Keep the backend's copy of the profile in sync with profile_data.js.
|
|
# Skipping this ships a CV built from stale facts.
|
|
if command -v node >/dev/null 2>&1; then
|
|
echo "🔄 Syncing profile.json from profile_data.js..."
|
|
node sync_profile.js || { echo "❌ Profile sync failed — aborting deploy."; exit 1; }
|
|
else
|
|
echo "⚠️ node not found — skipping profile sync. Verify server/profile.json is current."
|
|
fi
|
|
|
|
# Add all changes
|
|
git add .
|
|
|
|
# Get current date and time
|
|
TIMESTAMP=$(date +"%Y-%m-%d %H:%M:%S")
|
|
|
|
# Commit with timestamp
|
|
git commit -m "Auto-deploy: $TIMESTAMP"
|
|
|
|
# Push to origin main
|
|
git push origin main
|
|
|
|
echo "✅ Deployment pushed to Git successfully!"
|