ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developersโ€ข2mo agoโ€ข
1 reply
Lemon

Deploying worker on github branches

๐Ÿš€Startup Program
Hi guys, I need some help configurating a cloudflare worker but with two environments.
Correct me if I am wrong, cos I am just swtiching to cloudflare workers recently.
I want to have our github
main
main
branch to be production build
And I want to have our github
develop
develop
branch to be a staging build

I know it is possible to create a separate worker to link to
develop
develop
branch for a staging preview.
But is it possible to use the same production worker, but just change in the url for preview? Say, production is something like abc.com, and I want staging to be staging.abc.com, is it possible just to do it on the same worker? And how can I configure it in
wrangler.json
wrangler.json
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Deploying Cloudflare Worker AI with Flux 2
Cloudflare DevelopersCDCloudflare Developers / general-help
3mo ago
Error while deploying it to the worker
Cloudflare DevelopersCDCloudflare Developers / general-help
11mo ago
Don't think I deployed a worker but got "Congrats on deploying your first Worker." email
Cloudflare DevelopersCDCloudflare Developers / general-help
15mo ago
Move existing worker from dashboard editor to Github
Cloudflare DevelopersCDCloudflare Developers / general-help
2mo ago