ci: enhance deployment with file cleanup and forced container recreation
All checks were successful
FHIR IG CI/CD Pipeline with Version Persistence / build-ig (push) Successful in 6m25s
FHIR IG CI/CD Pipeline with Version Persistence / deploy (push) Successful in 9s

This commit is contained in:
jobayer
2025-12-22 13:38:59 +06:00
parent 3297b88035
commit c5e0a7d039

View File

@@ -315,6 +315,9 @@ jobs:
else else
TARGET_DIR="$VERSIONS_DIR/dev" TARGET_DIR="$VERSIONS_DIR/dev"
echo "🔧 Deploying dev build to: $TARGET_DIR" echo "🔧 Deploying dev build to: $TARGET_DIR"
echo "Cleaning old dev files..."
rm -rf "$TARGET_DIR"/*
fi fi
# Create target directory # Create target directory
@@ -347,9 +350,9 @@ jobs:
exit 1 exit 1
fi fi
# Restart nginx to pick up new content # Force recreate container to ensure new config/mounts are applied
docker compose -f docker-compose.prod.yml restart fhir-ig || \ # This handles "stuck" states better than a simple restart
docker compose -f docker-compose.prod.yml up -d docker compose -f docker-compose.prod.yml up -d --force-recreate fhir-ig
# Cleanup # Cleanup
rm -rf /tmp/fhir-ig-deploy rm -rf /tmp/fhir-ig-deploy