Skip to content
Cloudflare Docs

Build branches

When you connect a git repository to Workers, commits made on the production git branch will produce a Workers Build. If you want to take advantage of preview URLs and pull request comments, you can additionally enable "non-production branch builds" in order to trigger a build on all branches of your repository.

Change production branch

To change the production branch of your project:

  1. In Overview, select your Workers project.
  2. Go to Settings > Build > Branch control. Workers will default to the default branch of your git repository, but this can be changed in the dropdown.

Every push event made to this branch will trigger a build and execute the build command, followed by the deploy command.

Configure non-production branch builds

To enable or disable non-production branch builds:

  1. In Overview, select your Workers project.
  2. Go to Settings > Build > Branch control. The checkbox allows you to enable or disable builds for non-production branches.

When enabled, every push event made to a non-production branch will trigger a build and execute the build command, follwed by the non-production branch deploy command.