---
title: "Connect a deployment to a GitHub repository and trigger a build"
method: POST
path: "/build/api/v1/deployments/{deploymentId}/github/connect"
tags: ["GitHub Connection"]
---

# Connect a deployment to a GitHub repository and trigger a build

`POST /build/api/v1/deployments/{deploymentId}/github/connect`

## Path parameters

- `deploymentId` integer, required

## Request body

- ConnectGitHubRequest
  - `deployBranchName` string, nullable
  - `deployProjectRoot` string, nullable
  - `installationId` integer, required
  - `isNewRepo` boolean, nullable
  - `name` string, required
  - `private` boolean, nullable

## Response `200`

- Deployment
  - `creationStep` 'project' | 'upload' | 'schema' | 'github' | 'ssh' | 'databases' | 'ready' | 'demo', required
  - `deploymentUrl` string, required
  - `id` integer, required
  - `name` string, required

---

[API](https://skmtc.net/cube-js/apis/cube-cloud-rest-api.md) · [All operations](https://skmtc.net/cube-js/apis/cube-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cube-js/cube-cloud-rest-api/revisions/a0c6b1d2ac96/schema)
