Last updated

Add a GitHub repo

If your project files are stored in a repository on GitHub, you can connect that repository, so you can access, edit, and publish those files in Redocly.

To connect a GitHub repo:

  1. Install the Redocly app in GitHub.
  2. Enter the connection details in Redocly.

Install the Redocly app in GitHub

Before you enter the connection details in Redocly, you need to install the Redocly GitHub App on your organization in GitHub.

  1. Navigate to Install Redocly, and select the organization on GitHub.
  2. Enter your GitHub password to confirm access.
  3. Grant the Redocly GitHub App access to your project's repository.

See Installing a GitHub App from a third party in the GitHub documentation for more information.

Enter the connection details in Redocly

After you install the Redocly GitHub App on your organization in GitHub, you need to enter the connection details in Redocly.

  1. From your project, select Settings > Git hosting > GitHub > Next.

  2. Authorize your Redocly organization to verify your GitHub identity.

  3. Select your GitHub Organization > Repository > Branch.

  4. (Optional) Select the Monorepo folder, if your project files are part of a monorepo, and you want to include only a specific folder from the repository.

    Monorepo folder

    If you select to only include a specific folder from a monorepo:

    • Only files listed in file tree are cloned, no other files are included
    • Project builds are started only when branch contains changes to connected folder
    • Remote content is allowed to add to connected folder only
  5. Select Next > Connect.

    Warning

    This step deletes the files currently in the Redocly project and replaces them with the files in GitHub.