> ## 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.

# Dispatch GitHub repository event

> Send a custom repository dispatch event to GitHub.

`github.dispatchRepositoryEvent` sends a custom `repository_dispatch` event to a repository.

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

export default automation("Dispatch GitHub deployment", () => {
  github.dispatchRepositoryEvent({
    clientPayload: { environment: "production", releaseId: "rel_123" },
    eventType: "deploy.requested",
    owner: "SentsCo",
    repository: "automate.ax",
  })
})
```

Provide `owner`, `repository`, and an `eventType` of at most 100 characters. Optional `clientPayload` must be JSON-compatible, may have at most 10 top-level properties, and its JSON representation must be smaller than 64 KB. The action completes after GitHub accepts the event and returns `{}`. GitHub delivers the value as `action` to app webhooks and evaluates matching `repository_dispatch` workflow triggers on the default branch. Requires Contents write permission.
