Builds
The Cloudflare Git integration lets you connect a new or existing Worker to a GitHub or GitLab repository, enabling automated builds and deployments for your Worker on push.
To create a new Worker and connect it to a GitHub or GitLab repository:
- Log in to the Cloudflare dashboard ↗ and select your account.
- Go to Workers & Pages.
- Select Create.
- Under Import a repository, select a Git account.
- Select the repository you want to import from the list. You can also use the search bar to narrow the results.
- Configure your project and select Save and Deploy.
- Preview your Worker at its provided
workers.dev
subdomain.
To connect an existing Worker to a GitHub or GitLab repository:
- Log in to the Cloudflare dashboard ↗ and select your account.
- Go to Workers & Pages.
- Select the Worker you want to connect to a repository.
- Select Settings and then Builds.
- Select Connect and follow the prompts to connect the repository to your Worker and configure your build settings.
- Push a commit to your Git repository to trigger a build and deploy to your Worker.
You can monitor a build's status and its build logs by navigating to View build history at the bottom of the Deployments tab of your Worker.
If the build is successful, you can view the build details by selecting View build in the associated new version created under Version History. There you will also find the preview URL generated by the version under Version ID.
To disconnect a Worker from a GitHub or GitLab repository:
- Log in to the Cloudflare dashboard ↗ and select your account.
- Go to Workers & Pages.
- Select the Worker you want to disconnect from a repository.
- Select Settings and then Builds.
- Select Disconnect.
If you want to switch to a different repository for your Worker, you must first disable builds, then reconnect to select the new repository.
To disable automatic deployments while still allowing builds to run automatically and save as versions (without promoting them to an active deployment), update your deploy command to: npx wrangler versions upload
.
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