return

Control with Git branches deploy

Branch tracking rules let you control which Git branches automatically trigger builds and deployments when code is pushed to GitHub.

By default, monolayer automatically deploys code pushed to your project's tracked branches. Branch tracking rules let you customize this behavior for individual branches—such as automatically deploying code pushed to a staging branch, or preventing pushes to a feature branch from triggering live deployments.

Common branch tracking use cases

Add a branch rule when a specific branch needs a deployment behavior different from your project defaults:

  • Deploy staging pushes automatically: Enable tracking for a staging branch so every push automatically deploys to your staging environment.
  • Prevent feature branch deployments: Disable tracking for experimental or documentation branches so pushes do not trigger unnecessary builds.
  • Pause deployments during maintenance: Temporarily disable branch tracking while performing maintenance or database updates.

Add a branch tracking rule

To set a deployment policy for a specific branch:

  1. Click Projects in the global sidebar and select your project.
  2. Click Settings > Branch Tracking in the project sidebar.
  3. Type the exact Git branch name (such as staging) in the branch name field.
  4. Select Enable or Disable from the tracking mode menu.
  5. Click Add.

monolayer saves the rule and applies it to future code pushes.

Manage existing branch rules

  • Toggle a rule on or off: Click the status switch next to a rule in the rules list to temporarily pause or resume automatic deployments for that branch.
  • Delete a rule: Click the trash icon in a rule's row to remove it. Once deleted, the branch returns to the project's default deployment settings.

Verify your branch rule

To confirm that your branch rule works:

  1. Push a new commit to the managed branch in GitHub.
  2. If tracking is enabled, confirm that a new deployment appears in your monolayer project.
  3. If tracking is disabled, confirm that no deployment is triggered for the push.

For complete interface controls, see Branch Tracking Rules.

‍