We try not to judge folks’ workflows; I trust you have a reason for wanting what you want
Trunk-based development isn’t some strange idea, it’s quite popular and common.
It’s a workflow that Netlify just doesn’t really support that well, and I’m hoping that my suggested changes make the support a lot better.
I think what trunk-based devs are doing currently is just building elsewhere and then using the Netlify CLI to upload to various sites. Again, not ideal, and it could be so much better if Netlify supported this workflow directly.
You can link as many sites as you like to the same repo, put different names and different configs on them, even if you build the same branch.
Thanks, I’ll try this for the moment. It’s just not ideal to have two different places that I have to manage website config/settings.
An issue I’m running into implementing this workaroud, though, is that the deploy context for both sites is
production but that’s not what I want it to be for my staging website. (E.g. we’re using a
netlify.toml file with different contexts to determine which API backend to hit. But if both the “staging” website and the “production” website have the
production context, they’re both hitting production APIs.)
Is there a way to change the context, or is it always just determined by the main branch? I wasn’t able to find anything concrete in the docs. But I could have missed something?
If not, then I think my next best bet is to just pull deploys out of Netlify and do them somewhere else (e.g. CircleCI) and then upload the built files to separate Netlify websites? (alternatively, I can change those to run-time variables as well)