# GitHub (/docs/compute/github)

> For the complete Prisma documentation index, see [llms.txt](https://www.prisma.io/docs/llms.txt). A markdown version of any docs page is available by appending `.md` to its URL.

Connect a GitHub repository to a project and Prisma deploys on every push, with previews tracking your Git branches.

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 @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 @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 doesn't block: it gives you the install URL to finish in the browser, so automation can hand the install off:

  

#### bun

```bash
bunx @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 @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]

Auto-deploy handles monorepos that declare their apps in `prisma.compute.ts`: one pushed commit fans out into a targeted build per app. For 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. Each webhook deployment posts a "Prisma Compute Deploy" check run on the commit — success or failure, with the deploy URL — on a best-effort basis. Pull-request comments and preview comments aren't part of the beta surface.

## Next steps [#next-steps]

* [Branching](https://www.prisma.io/docs/compute/branching): how platform branches map to Git.
* [Deployments](https://www.prisma.io/docs/compute/deployments): what happens after a push builds.
* [Environment variables](https://www.prisma.io/docs/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.
- [`Configuration`](https://www.prisma.io/docs/compute/configuration): Declare your deployable app in a typed prisma.compute.ts file so deploys are reproducible and monorepos work, without re-passing flags every time.
- [`Deployments`](https://www.prisma.io/docs/compute/deployments): Build, deploy, inspect, promote, and roll back app deployments on Prisma Compute.