/repos/{owner}/{repo}/deploymentsCreate a deployment
Creates a deployment for a repository reference such as a branch, tag, or SHA. Supply ref and use environment, task, required_contexts, and merge settings to control how the deployment is prepared and validated. A deployment can trigger an automatic merge or return a merged-branch response when the requested reference is behind the default branch.
- RetriesRetries up to 2×, 500ms backoff, 30s timeout.
Deployment details. ref is required; omitted optional fields use their documented defaults.
A 409 is returned when automatic merging encounters a conflict or required commit status checks do not succeed. A 422 is returned when validation fails or the endpoint has been spammed. ref is required; environment defaults to production, task defaults to deploy, and auto_merge defaults to true when omitted.
Was this helpful?