# GitHub (/docs/compute/github)

Location: Compute > GitHub

Connect a GitHub repository to a project and Prisma deploys on every push. Branch and push events map to platform branches automatically, so your previews track your Git branches.

How it works [#how-it-works]

The connection has two levels:

<ConceptAnimation name="github-connection" />

The workspace owns the GitHub App installation; each project points at a single repository. Once connected, Prisma listens for that repo's branch events and keeps the matching platform branches in sync.

In beta, a project connects to one repository.

Connect a repo [#connect-a-repo]

From a linked project directory, connect your Git origin:

  

#### bun

```bash
bunx --bun @prisma/cli@latest git connect
```

#### pnpm

```bash
pnpm dlx @prisma/cli@latest git connect
```

#### yarn

```bash
yarn dlx @prisma/cli@latest git connect
```

#### npm

```bash
npx @prisma/cli@latest git connect
```

To name the repository explicitly:

  

#### bun

```bash
bunx --bun @prisma/cli@latest git connect https://github.com/acme/shop
```

#### pnpm

```bash
pnpm dlx @prisma/cli@latest git connect https://github.com/acme/shop
```

#### yarn

```bash
yarn dlx @prisma/cli@latest git connect https://github.com/acme/shop
```

#### npm

```bash
npx @prisma/cli@latest git connect https://github.com/acme/shop
```

If the GitHub App isn't installed yet, the CLI starts the install flow. In `--json` / `--no-interactive` mode it returns an install URL instead of blocking, so automation can hand it off:

  

#### bun

```bash
bunx --bun @prisma/cli@latest git connect https://github.com/acme/shop --json --no-interactive
```

#### pnpm

```bash
pnpm dlx @prisma/cli@latest git connect https://github.com/acme/shop --json --no-interactive
```

#### yarn

```bash
yarn dlx @prisma/cli@latest git connect https://github.com/acme/shop --json --no-interactive
```

#### npm

```bash
npx @prisma/cli@latest git connect https://github.com/acme/shop --json --no-interactive
```

Disconnect when you're done:

  

#### bun

```bash
bunx --bun @prisma/cli@latest git disconnect
```

#### pnpm

```bash
pnpm dlx @prisma/cli@latest git disconnect
```

#### yarn

```bash
yarn dlx @prisma/cli@latest git disconnect
```

#### npm

```bash
npx @prisma/cli@latest git disconnect
```

Disconnecting stops future automation. It doesn't delete the project or tear down existing branches.

What events do [#what-events-do]

Once a project is connected:

* **Branch created** → creates the matching platform branch.
* **Push** → creates or resolves the matching branch and builds the pushed commit.
* **Branch deleted** → tears down the matching branch, unless it's the production or default branch.

Connecting doesn't deploy anything on its own; it wires up automation for *future* events. To deploy right now, run `app deploy` yourself.

CI and monorepos [#ci-and-monorepos]

GitHub auto-deploy is single-app in beta. For monorepos, custom pipelines, or anywhere you want full control, run the CLI directly with a service token and explicit targets:

```bash
PRISMA_SERVICE_TOKEN=... npx @prisma/cli@latest app deploy \
  --project my-app \
  --app web \
  --branch "$GITHUB_HEAD_REF" \
  --json \
  --no-interactive
```

This keeps deploys deterministic and gives agents a structured result to read.

What's not in beta [#whats-not-in-beta]

GitHub is the only supported provider; others return `REPO_PROVIDER_UNSUPPORTED`. The webhook path is branch- and push-driven only: don't rely on pull-request comments, PR status checks, or preview comments. They aren't part of the beta surface.

Next steps [#next-steps]

* [Branching](/compute/branching): how platform branches map to Git.
* [Deployments](/compute/deployments): what happens after a push builds.
* [Environment variables](/compute/environment-variables): per-branch config for previews.

## Related pages

- [`@prisma/cli`](https://www.prisma.io/docs/compute/getting-started): Deploy your first app to Prisma Compute with the @prisma/cli beta package, then learn the variations you'll need next.
- [`Branching`](https://www.prisma.io/docs/compute/branching): Branches are isolated environments that map to your Git branches, so preview work never touches production.
- [`CLI reference`](https://www.prisma.io/docs/compute/cli-reference): Every @prisma/cli command, flag, environment variable, and error code for Prisma Compute.
- [`Deployments`](https://www.prisma.io/docs/compute/deployments): Build, deploy, inspect, promote, and roll back app deployments on Prisma Compute.
- [`Domains`](https://www.prisma.io/docs/compute/domains): Point a custom domain at a production app and the platform verifies DNS and provisions TLS for you.