-
Hello all, I'm working on a little integration between Vercel and Snaplet leveraging Github Actions and the Vercel Git Integration. I noticed that when a pull request is merged and the branch is deleted, the deployments aren't deleted, either on Vercel or Github's side. Is there any way to automatically clean up all the deployments related to a branch on both sides? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
You can remove deployments using the CLI or Vercel API. The downside is you need to keep track of which deployments are related to that branch if you don't want to remove preview deployments for other branches. If you want to delete all deployments aside from active preview or production, then you can use the safe option like Vercel doesn't provide a way to remove branches or change data in GitHub, but this sounds like something you could add to your GitHub Actions. |
Beta Was this translation helpful? Give feedback.
-
You can now configure the retention period for deployments through the dashboard and CLI. For example, canceled and errored deployments might be set to 30 days retention, while production deployments might be set to 1 year. Recently deleted deployments are shown in your project settings and can be instantly restored within 30 days of deletion. Learn more in our documentation. |
Beta Was this translation helpful? Give feedback.
You can now configure the retention period for deployments through the dashboard and CLI.
For example, canceled and errored deployments might be set to 30 days retention, while production deployments might be set to 1 year. Recently deleted deployments are shown in your project settings and can be instantly restored within 30 days of deletion.
Learn more in our documentation.