Publish to the right branch when multi-domains enabled

Hello.

I recently develop website under Gatsby and used Netlify to go live. It actually work like a charm.

We want to improve our pages by internal reviews workflow, using git and separated environments (aka branches). I want to know if there is any way to make the Publish button pushing the generated markdown to the related branch ? It actually showing the master branch and pushing on it.

I can’t even mount a dev workstation to every content collaborators that will act on that website, and I have to let them test in a sandbox place before go live. I was wondering about using Github’s pull requests system to achieve the go-live part, but I need to separate the “administrative branch”

Thanks

let me make sure i understand - are you talking about branch deploys?

Hello. Yes, I’m using branch deploys and want to be able to push :

  • on foo if I’m on foo–.netlify.com/admin
  • on bar if I’m on bar–.netlify.com/admin
  • on baz if I’m on baz–.netlify.com/admin

Hope that is easier to understand :slight_smile:

Any news / updates about that need ?

Hey @benftwc! If you have branch deploys enabled, then when you open a PR against that branch, we will generate a “deploy preview” of the site with the PR changes applied- this should meet the “sandbox” requirement you described. The docs that @perry shared above have instructions for setting up deploy previews for branch deploys. Re-linking here in case it’s helpful:

You’ll want to check out those instructions to make sure you’ve added all the branches that you want deploy previews for in our UI. In the UI, the settings will be here (replace YOUR-SITE with… your site :slight_smile: ):

You can also set up notifications to add Netlify’s deploy preview link to the PR in GitHub as a comment:

We use this workflow internally for some of our sites. Let us know how it goes or if you run into any issues.