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.

Hi all, just wanted to add a +1 to the feature request for “Automatically build deploy previews for all pull requests for any branch (not limited to selection in “Branch deploys”)”; this would be super helpful to us, as we often will chain pull requests off of each other, and it’s useful to have the deploy preview for PRs that are made off of the initial PR.

(Apologies if this isn’t the right place to put this, I tried looking for the specific feature request and couldn’t find it. Thanks!)

++++1
Is there a status on this request? I would also like deploy previews to generate for all branches and not just for the prod branche and branch deploy branches

hi there yuhan,

at the moment we have nothing new to share with you, unfortunately! but if/when we do, we’ll definitely let you know.

Is there any update on this feature? Really need this one!
Thanks

No updates thus far, I’m afraid.

+1 to this request as well. We use deploy previews to run our automated end-to-end tests, and in some cases they don’t get run due to the lack of a deploy preview being created.

We’d really like the option to build deploy previews for all pull requests for any branch.