I am using multiple static sites for our QA (staging) and Demo (production alike) environment deployment using different git branches.
branch: test => deploys to test.domain.com
branch: demo => deploys to demo.domain.com
branch: master => deploys to prod.domain.com
When new updates get released, test and demo branches gets deleted and are synced with master. During this process, render automatically switches branches for test and demo to the master branch.
Are there any settings available to stop this behaviour ?
There may be ways to workaround it, most simply, maybe don’t delete the branches when they’re merged with master? You could maybe reset them to master after merging, to get them back in sync.
However, I wouldn’t want you to have to change your workflow, maybe if you have some automation/GitHub actions doing these merge/deletions, you could use the Render API to set the branch back to the desired branch when it is recreated?, e.g.
Alternatively, utilising Pull Request Previews might be an option, to keep these other branches within a main static site? If you’re utilising GitHub PRs they would be deleted & created along with the Pull Request. Although, this approach wouldn’t have your custom domains by default.
You could maybe reset them to master after merging, to get them back in sync.
I think this will do fine for me. I was just wondering about this default behaviour of auto switching and not-auto-switching if I create the branch again .