fix: add automatic nginx reload to deployment script

PERMANENT FIX for cache invalidation issues:
- Automatically reload nginx after every deployment
- Clears all server-side caches immediately
- Prevents stale content being served
- No more manual cache clearing needed

This resolves recurring deployment cache issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
TheFlow 2025-11-03 13:09:50 +13:00
parent dd4c16e7a0
commit f42a6b0bcc

View file

@ -364,6 +364,13 @@ fi
echo ""
echo -e "${GREEN}✓ Deployment complete${NC}"
# CRITICAL: Force nginx to reload and clear any cached content
echo ""
echo "Reloading nginx to clear server-side caches..."
ssh -i "$DEPLOY_KEY" "${REMOTE_USER}@${REMOTE_HOST}" "sudo systemctl reload nginx"
sleep 1
echo -e "${GREEN}✓ Nginx reloaded - all server-side caches cleared${NC}"
# Step 7: Post-deployment
echo ""
echo -e "${GREEN}[7/7] POST-DEPLOYMENT${NC}"