Deploying worker on github branches

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
branch to be production build
And I want to have our github develop branch to be a staging build

I know it is possible to create a separate worker to link to 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
Was this page helpful?