Back to Documentation
Deployment
Deploy from GitHub
Connect your GitHub repository for automatic deployments on every push. Set up CI/CD in minutes.
1Connect GitHub Account
First, connect your GitHub account to Berican Labs:
- Go to Dashboard > Settings > Git Integration
- Click "Connect GitHub"
- Authorize Berican Labs in the GitHub popup
- Select which repositories to grant access to
You can choose to give access to all repositories or select specific ones.
2Import a Repository
Once connected, import your repository:
- Click "New Site" in your dashboard
- Select "Import from GitHub"
- Choose your repository from the list
- Select the branch to deploy (usually
mainormaster) - Configure build settings
- Click "Deploy"
3Automatic Deployments
After setup, every push to your selected branch triggers a new deployment:
- Push to main: Triggers production deployment
- Push to other branches: Creates preview deployments (optional)
- Pull requests: Get unique preview URLs for testing
You can configure which branches trigger deployments in Site Settings > Git.
4Build Configuration
Berican Labs auto-detects most frameworks. You can also configure manually:
# berican.json
{
"buildCommand": "npm run build",
"outputDirectory": "dist",
"installCommand": "npm ci",
"nodeVersion": "18"
}
Or configure in Dashboard > Site Settings > Build & Deploy.
5Deploy Hooks
Trigger deployments programmatically using deploy hooks:
- Go to Site Settings > Deploy Hooks
- Create a new hook with a name
- Copy the webhook URL
- Send a POST request to trigger deployment
curl -X POST https://api.bericanlabs.com/hooks/deploy/YOUR_HOOK_ID