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:

  1. Go to Dashboard > Settings > Git Integration
  2. Click "Connect GitHub"
  3. Authorize Berican Labs in the GitHub popup
  4. 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:

  1. Click "New Site" in your dashboard
  2. Select "Import from GitHub"
  3. Choose your repository from the list
  4. Select the branch to deploy (usually main or master)
  5. Configure build settings
  6. 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:

  1. Go to Site Settings > Deploy Hooks
  2. Create a new hook with a name
  3. Copy the webhook URL
  4. Send a POST request to trigger deployment
curl -X POST https://api.bericanlabs.com/hooks/deploy/YOUR_HOOK_ID