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