> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leanly.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

> Connect a GitHub account or organisation so Leanly can build and deploy your apps.

Leanly uses a GitHub App to access your repositories. The app reads your code to detect your app type, builds on new commits, and triggers deployments — nothing else.

## Install the GitHub App

<Steps>
  <Step title="Open integrations">
    In the Leanly dashboard, go to **Integrations**, select **GitHub** and click **Connect Account**. You will be redirected to GitHub.
  </Step>

  <Step title="Authorize the app">
    GitHub will ask you to confirm the installation. Choose the account or organisation you want to connect.
  </Step>

  <Step title="Grant repository access">
    Select which repositories Leanly can access. You can grant access to all repositories or pick specific ones. We recommend limiting access to the repositories you intend to deploy.
  </Step>

  <Step title="Confirm">
    Click **Install** to complete the setup. Leanly will confirm the connection and you can start deploying.
  </Step>
</Steps>

## Permissions

Leanly requests the minimum permissions needed to build and deploy your app.

| Permission      | Access         | Why                                                                        |
| --------------- | -------------- | -------------------------------------------------------------------------- |
| Metadata        | Read           | Access basic repository information                                        |
| Code            | Read and write | Read your code to detect your app type and commit deployment configuration |
| Commit statuses | Read and write | Report deployment status on commits                                        |
| Pull requests   | Read and write | Trigger and report deployments from pull requests                          |

Leanly only accesses repositories you explicitly grant permission to. You can adjust this at any time in your [GitHub App settings](https://github.com/apps/leanlydev/installations/new).

## Manage access

To add or remove repository access after installation, go to your GitHub account or organisation settings under **Applications**, under **Installed GitHub Apps**, find Leanly, and click **Configure**.
