If GitHub is your choice of source repository and you have been grappling with various external tools to work with Github and co-ordinate deployment, then help is on the way with the new GitHub Deployment API. Currently available in preview, the API allows you to request a particular Branch, tag it to be deployed, and then the API triggers a series of events that your external tooling applications can listen to via webhooks and kick off their processes.
GitHub's Deployment API aims to generalize the deployment model based on Github's experience. Once developers preview this, several best practices are expected to emerge, along with additional tools that developers could build around it.
At a high level, the API might just look like a mechanism for creating events and passing them onto subscribes, but there are enough built-in checks behind the scenes to not blindly inform the tools that it is ready to deploy. For example, some of the features of the API also include Commit Status Integration, which rejects deployment requests for repositories that have commit statuses but don’t have a green build for the deployment ref. Auto Merging and Force Deployments are additional features that make the API powerful behind the scenes.
The Deployment API contains the following API methods to manage your deployments:
Here is a sample process flow of the different actors (your toolset, GitHub, any third-party applications waiting for notification about Deployment Events via Webhooks or your deployment server):