Clean up GitLab preview deployments on merge
The updated GitLab CI/CD pipeline now includes a cleanup_preview stage that deletes a merge request’s preview deployment once the MR merges into the default branch, so stale previews don’t linger.
To adopt this workflow, replace your .gitlab-ci.yml file with the updated version.