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:
- Go to Dashboard > Settings > Git Integration
- Click "Connect GitLab"
- Authorize Berican Labs in the GitLab popup
- Grant access to your projects
We support both GitLab.com and self-hosted GitLab instances.
2Self-Hosted GitLab
For self-hosted GitLab instances:
- Go to Dashboard > Settings > Git Integration
- Click "Add Self-Hosted GitLab"
- Enter your GitLab instance URL
- Create an access token in GitLab with
apiandread_repositoryscopes - Paste the token in Berican Labs
3Import a Project
Import your GitLab project:
- Click "New Site" in your dashboard
- Select "Import from GitLab"
- Choose your project from the list
- Select the branch to deploy
- Configure build settings
- 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:
- Go to Site Settings > Git
- Enable "Deploy Merge Requests"
- Each MR gets a unique preview URL
- Preview URLs are posted as comments on the MR
Preview deployments are automatically deleted when the MR is closed or merged.