Skip to main content
PUT
Connect a Git repository to a Pages site

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Path Parameters

site_name
string
required

The site's name, which is also its host label.

Body

application/json
repository_owner
string
required

The GitHub user or organisation that owns the repository.

repository_name
string
required
production_branch
string
required

The branch whose pushes deploy the production alias, like main.

provider
enum<string>

The Git provider; github when absent.

Available options:
github
root_directory
string

The directory of the repository the site is served from, relative to its root; empty or absent serves the root.

previews
boolean

Whether other branches and pull requests from the same repository deploy preview aliases; true when absent.

Response

The repository is connected: pushes to it deploy the site.

The GitHub repository a site deploys from.

site_name
string
required
provider
enum<string>
required
Available options:
github
repository_owner
string
required
repository_name
string
required
production_branch
string
required

The branch whose pushes deploy the production alias.

root_directory
string
required

The directory of the repository the site is served from; empty serves the repository's root.

previews
boolean
required

Whether pushes to other branches, and pull requests from the same repository, deploy preview aliases.

created_at
string<date-time>
required
updated_at
string<date-time>
required