> ## Documentation Index
> Fetch the complete documentation index at: https://help-center-starter-replace-template-content.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect your repository

> How Mintlify connects to GitHub and GitLab to deploy your docs.

Mintlify deploys directly from your Git repository. Connecting your repository is the first step to getting your docs site live.

## GitHub

<Steps>
  <Step title="Install the GitHub App">
    During signup (or from **Settings → Integrations → GitHub**), click **Install GitHub App**. Choose the GitHub organization or personal account where your docs repository lives.

    Grant the app access to the specific repository (or all repositories, if you prefer). Mintlify only reads your repository content — it does not write to your repo.
  </Step>

  <Step title="Select your repository">
    After installing the app, return to the Mintlify dashboard and select the repository to use for your project. Mintlify clones the repo and starts the first build.
  </Step>

  <Step title="Configure your default branch">
    By default, Mintlify deploys from your repository's default branch (usually `main`). You can change the deployment branch in **Project Settings → Git**.
  </Step>
</Steps>

## GitLab

GitLab integration uses a webhook instead of an app:

1. In your Mintlify project settings, go to **Settings → Git → GitLab**.
2. Copy the provided webhook URL and secret.
3. In your GitLab repository, go to **Settings → Webhooks** and add the URL and secret.
4. Enable the **Push events** trigger.

Mintlify will deploy whenever you push to the configured branch.

## Monorepos

If your documentation lives in a subdirectory of a larger repository, set the **Docs root** in **Project Settings → Git** to the path of the subdirectory (for example, `docs/`). Mintlify will treat that directory as the root of your docs site.
