Reusing deployment vs create a new one

When you need to trigger a deployment (e.g. to Does it make sense to find an existing deployment (for that environment) and set its status to “in-progress” while CI is deploying the app, then back to “success” once the deployment completes? Or, is it better to create a new deployment entry via GitHub API?

@koistya ,

Every deployment has its ref (can be branch , tag , or SHA ). Once the deployment generated, we can’t change the ref of the deployment, although we can change the status and environment of the existing deployment.

So when you need to trigger a deployment for a new ref, a new deployment is needed for the new ref. And the previous deployment will keep the status you have changed to, even if the new deployment has completed successfully.