GitHub Deployments

No description specified

Warning: This section is under construction

Every gh CLI command below will rely on a few variables being set. Additionally, every command has a curl alternative. In my opinion, the curl alternative is a lot more cumbersome as you need to pass an Authorization header each time.

List deployments

Create a Deployment


If the ref doesn't exist:

If any commit status checks failed...



Deployment Statuses

List deployment statuses

Note: This will likely be empty until a deployment status has been created.

Create a deployment status

1 deployment's environment can be flipped to whatever.

You’ll get an audit log of changes at when you list deployment statuses

state can be one of: error, failure, inactive, in_progress, queued, pending, success The state of the status. When you set a transient deployment to inactive, the deployment will be shown as destroyed in GitHub.

When creating a success state, you'll see an entry like

f7a9870 was deployed by Avatar thiskevinwang 2 hours ago Active

  • deployed: the value that was passed into log_url. If no log_url was passed, the UI will not render a link.

Use cases?

With GitHub actions

You could run a GitHub action when a 3rd party platform like Vercel, Netlify, or Heroku