Back to Documentation
Deployment

Deploy from GitLab

Connect your GitLab repository for automatic deployments. Works with GitLab.com and self-hosted instances.

1Connect GitLab Account

Connect your GitLab account to Berican Labs:

  1. Go to Dashboard > Settings > Git Integration
  2. Click "Connect GitLab"
  3. Authorize Berican Labs in the GitLab popup
  4. Grant access to your projects

We support both GitLab.com and self-hosted GitLab instances.

2Self-Hosted GitLab

For self-hosted GitLab instances:

  1. Go to Dashboard > Settings > Git Integration
  2. Click "Add Self-Hosted GitLab"
  3. Enter your GitLab instance URL
  4. Create an access token in GitLab with api and read_repository scopes
  5. Paste the token in Berican Labs

3Import a Project

Import your GitLab project:

  1. Click "New Site" in your dashboard
  2. Select "Import from GitLab"
  3. Choose your project from the list
  4. Select the branch to deploy
  5. Configure build settings
  6. Click "Deploy"

4GitLab CI/CD Integration

You can also trigger deployments from your GitLab CI/CD pipeline:

# .gitlab-ci.yml
deploy:
  stage: deploy
  script:
    - curl -X POST $BERICAN_DEPLOY_HOOK
  only:
    - main

Add your deploy hook URL as a CI/CD variable in GitLab.

5Merge Request Previews

Enable preview deployments for merge requests:

  1. Go to Site Settings > Git
  2. Enable "Deploy Merge Requests"
  3. Each MR gets a unique preview URL
  4. Preview URLs are posted as comments on the MR

Preview deployments are automatically deleted when the MR is closed or merged.