diff --git a/images/gitlab/gitlab-config.png b/images/gitlab/gitlab-config.png new file mode 100644 index 0000000..bdd9d33 Binary files /dev/null and b/images/gitlab/gitlab-config.png differ diff --git a/images/gitlab/gitlab-webhook.png b/images/gitlab/gitlab-webhook.png new file mode 100644 index 0000000..730c45a Binary files /dev/null and b/images/gitlab/gitlab-webhook.png differ diff --git a/settings/gitlab.mdx b/settings/gitlab.mdx index 1de36ff..df4085b 100644 --- a/settings/gitlab.mdx +++ b/settings/gitlab.mdx @@ -1,37 +1,32 @@ --- title: "GitLab" description: "Sync your docs with a GitLab repo" -icon: 'gitlab' +icon: "gitlab" --- - GitLab integration is available on the [Enterprise plan](https://mintlify.com/pricing). + GitLab integration is available on the [Enterprise + plan](https://mintlify.com/pricing). -We use a combination of Access tokens and Webhooks to authenticate and sync changes between GitLab and Mintlify. +We use a combination of Access tokens and Webhooks to authenticate and sync +changes between GitLab and Mintlify. -* We use Access tokens to pull information from GitLab Mintlify. -* We use Webhooks so GitLab can notify Mintlify when changes are made. - * This allows Mintlify to create preview deployments when a MR is created. +- We use Access tokens to pull information from GitLab. +- We use Webhooks so GitLab can notify Mintlify when changes are made. + - This allows Mintlify to create preview deployments when a MR is created. - - - Within your Mintlify dashboard, click on the `Settings` tab and select [`Git Settings`][git-settings]. - - - Click on `Switch to GitLab` which will open a panel to enter your GitLab information. - - +## Set up the connection - + - In another tab, navigate to your GitLab's project `Settings` > `General` and find the `Project ID`. + Within your GitLab project, navigate to `Settings` > `General` and find the `Project ID`. - - a. Navigate to your GitLab's project `Settings` > `Access Tokens`. + + a. Navigate to `Settings` > `Access Tokens`. b. Select `Add new token`. 1. Name the token "Mintlify". @@ -43,25 +38,43 @@ We use a combination of Access tokens and Webhooks to authenticate and sync chan - - - a. Navigate to your GitLab's project `Settings` > `Webhooks`. + + + Within the [Mintlify dashboard](https://dashboard.mintlify.com/mintlify/mintlify/settings/deployment/git-settings), add the project ID and access token from the previous steps alongside the other configurations. Click "Save Changes" when you're done. + + + + + - b. In the "URL" field, enter the endpoint `https://leaves.mintlify.com/gitlab-webhook` +## Create the webhook - c. Name the webhook "Mintlify". +Webhooks allow us to receive events when changes are made so that we can +automatically trigger deployments. - d. Paste the Webhook token generated after completing the previous steps. + + - + + + + In the "URL" field, enter the endpoint `https://leaves.mintlify.com/gitlab-webhook` and name the webhook "Mintlify". - e. Select the events you want to trigger the webhook: - - Push events (All branches) - - Merge requests events - f. Click `Add webhook`. + + + Paste the Webhook token generated after setting up the connection. + + + + + + Select the events you want to trigger the webhook: + - Push events (All branches) + - Merge requests events + When you're done it should look like this: @@ -77,12 +90,13 @@ We use a combination of Access tokens and Webhooks to authenticate and sync chan + - Reach out to the Mintlify team if you need help. - Contact us [here](https://mintlify.com/enterprise). + Reach out to the Mintlify team if you need help. Contact us + [here](https://mintlify.com/enterprise). [git-settings]: https://dashboard.mintlify.com/settings/deployment/git-settings