Pull Requests deploy previews not triggering for non-main branch

We have a Netlify website connected to GitHub, with deploy previews for all Pull Requests:

Usually we send PRs to the develop branch, and these get a deploy preview.
However, sometimes we have “side branches” (in our case, release branches), and we want to submit PRs to them as well, which would also get deploy previews (the option does say “for all pull requests” (emphasis mine), after all).
However, we see that PRs to any branch other than the Production branch, or branches defined in “Branch deploys” do not trigger a deploy preview in Netlify for some reason.

If I added these release branches to the “Branch deploys” and create a PR from myBranch to the release branch, Netlify does create a deploy preview for it.

Please advise.

The site name is brandtotal-www-frontend, though I’m not sure how much it helps here :man_shrugging:

Hi @bengry,

That wording is a bit suboptimal and I have a pull request open to change it to something more like “automatically build deploy previews for all branches configured to build in our UI”. That’s what we do - so in your case, though I can’t see what branches might be configured in the next line you cut off in your screenshot, I’d guess that the branches your PR is TARGETING are not listed on that screen. Add it in, and we’ll start building :slight_smile:

If you want better advice, I’d suggest telling us which site this is so we can look at the settings ourselves, but I am pretty confident in that behavior…

@fool Thanks for the explanation.

I did write the site name in the OP:

The site name is brandtotal-www-frontend , though I’m not sure how much it helps here :man_shrugging:

So http://brandtotal-www-frontend.netlify.app/

Here’s what we have now:

I’ve had to add release/21 there to get PRs targeting it to get PR deploy previews.

From what I understand then, it’s the wording that’s off, and the actual behavior is as-expected - deploy for any PR targeting one of these:

  1. Production branch
  2. Branch deploys branches

Is there a way to make deploy previews get created for any PR? As mentioned, the issue here is that most branches we’ll have in the Branch deploys are short-lived, but crucial (i.e. release branches and/or hotfix branches). I can of course just change the toggle to use the “All” for “branch deploys”, but that’s sub-optimal by far, since it ignores pull requests completely, and so every push, to every branch, will get built, which is not what we want.

Hi, @bengry, thank you for explaining what you want in such detail. It is very clear what you want or, at least, I think it is clear (more below on this).

I’m going to summarize to see if my understanding is correct.

Summary follows:

There should be a third options in “Deploy previous” and we should probably rename the existing first option. The options would be:

  • Automatically build deploy previews for all pull requests (only those selected in “Branch deploys”)
  • Automatically build deploy previews for all pull requests for any branch (not limited to selection in “Branch deploys”).
  • Don’t build deploy previews for pull requests

The first option is the existing first option with more text to make it clearer what it really does. The second option is the new option you are asking for. The third option is unchanged.

Is my understanding above correct? Likely someone will change the text to be used above and the final version would likely be different, but is the general idea captured by this description? Am I misunderstanding or missing anything?

If this was correct above, please let us know that as well. If it is, we’ll get the feature request filed and cross-linked to this community topic for follow-up.

Yes, this is exactly right. Thanks @luke.

Thanks! We’ll work on getting this updated.