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.
To change the production branch of your project:
- In Overview, select your Workers project.
- 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.
To enable or disable non-production branch builds:
- In Overview, select your Workers project.
- 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.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark