> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## 合并时清理 GitLab 预览部署

更新的 [GitLab CI/CD 流水线](/learn/zh/docs/developer-tools/git-lab#add-the-cicd-pipeline)现在包含一个 `cleanup_preview` 阶段，在合并请求合并到默认分支后删除该 MR 的预览部署，避免陈旧的预览残留。

要采用此工作流程，请用更新的版本替换您的 `.gitlab-ci.yml` 文件。

阅读文档