> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Create GitHub deployment

> Create a GitHub deployment for a branch, tag, or commit.

`github.createDeployment` creates a deployment record for a ref.

```ts automations/create-github-deployment.automation.ts theme={null}
import { automation } from "automate.ax"
import { github } from "automate.ax/github"

export default automation("Create GitHub deployment", () => {
  github.createDeployment({
    autoMerge: false,
    environment: "production",
    owner: "SentsCo",
    payload: { releaseId: "rel_123" },
    productionEnvironment: true,
    ref: "v2.0.0",
    repository: "automate.ax",
  })
})
```

Provide the repository and branch, tag, or commit `ref`. `task` defaults to `"deploy"`; `autoMerge` defaults to `true`. Omit `requiredContexts` to require every unique commit-status context before deployment. Pass an empty array to bypass status checks, or list the exact contexts GitHub must verify. Optional fields also include JSON `payload`, `environment`, `description`, `transientEnvironment`, and `productionEnvironment`. Returns the deployment's `id`, `ref`, and `environment`, or GitHub's accepted auto-merge `message` when it must update the ref first. Requires Deployments write permission.
