> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. # Connect a Git repository > Link your GitHub or GitLab repository to your Fern project for automated deployments. Connect the Fern Dashboard to the repository containing your Fern documentation. Once connected, your docs automatically deploy when you push changes, and [Fern Editor](/learn/docs/writing-content/fern-editor) commits edits back to the repository. ## GitHub To complete the repo connection, you need: * **Admin access** to the GitHub organization where the repository exists * The [Fern GitHub app](https://github.com/apps/fern-api) installed on the repository #### Open the Dashboard Navigate to the [Fern Dashboard](https://dashboard.buildwithfern.com/) and select your documentation site. #### Connect your repository In the **Overview** tab, Find the **Source** section and select **Connect repo**. Follow the prompts to authorize the Fern API GitHub app. #### Install the GitHub app If you haven't already installed the [Fern GitHub app](https://github.com/apps/fern-api), you'll be prompted to install it on your repository. You must be an admin on your GitHub organization to complete this step. #### Select your repository Choose the repository containing your Fern documentation. Once connected, Fern automatically deploys your documentation when you push changes to the configured branch. ## GitLab GitLab has no equivalent of the Fern GitHub app, so Fern configures the connection with an access token you provide. The token is only required for [Fern Editor](/learn/docs/writing-content/fern-editor). Publishing from [GitLab CI/CD](/learn/docs/developer-tools/git-lab) doesn’t require Fern’s access to your repository. Fern uses the token to read your `fern` folder and to open merge requests for Editor changes. It never pushes to your default branch, and revoking the token disconnects the integration. #### Create an access token [Create a personal access token](https://gitlab.com/-/user_settings/personal_access_tokens) in GitLab with the `read_user`, `api`, `write_repository`, `read_repository`, and `read_api` scopes. Set a long expiration to avoid interrupting deployments and Editor sessions: you can revoke the token at any time. #### Send the token to Fern Contact Fern support via Slack or [email](mailto:support@buildwithfern.com) with your access token and GitLab repository URL. #### Connect your repository Once Fern configures the connection, select **Connect repo** in the **Source** section of the **Overview** tab and choose your repository. [Fern Editor](/learn/docs/writing-content/fern-editor) changes on GitLab arrive as merge requests. #### Optional: support access Inviting `support@buildwithfern.com` to the repository as a Developer lets Fern review your configuration and open merge requests when you request help. This is optional, separate from the access token, and can be limited to onboarding with a membership expiration date. > Link your GitHub or GitLab repository to your Fern project for automated deployments.