Home
Support Forums

New branch/subdomain is unrecoverable if created in the wrong order and branch cannot be changed

Our site: sdk.operatorframework.io

Our workflow for creating versioned documentation is that we create a new release branch, and then build our assets, and then publish the docs. A requirement for this workflow is that the new branch must be on the same git commit as the commit used to build the assets.

On Netlify, our process is:

  1. Add the not-yet-existent branch Build&Deploy → Branches → individual branches
  2. Create the new branch. On the Netlify side, this causes Domain → Branch Subdomains → “No more branches” to change to an option to add the new branch/subdomain.

If the individual branch is typed incorrectly, or added after the creation of the new branch, we are in a state where we cannot modify the branch, nor get netlify to add the option for a new branch/subdomain.

None of our branches are currently in a broken state, so a one-off fix is not required, but going forward, is there a way to trigger Netlify to look for a new branch rather than wait for the branch commit to change?

Hey, thanks for your patience! I think you are describing the issue discussed here: Branch subdomains and new branches bug?

If not, would you mind describing the issue further?

Yes that is the same issue, however the solution of adding a commit to trigger the build isn’t ideal.

I’m guessing that Netlify has a webhook set up for the branches, and only triggers the deploy when the branch changes. If we set up the netlify configuration after the branch is in its final state, I don’t know of a way to trigger the deploy without an additional commit.

Thanks again for your patience!

is there a way to trigger Netlify to look for a new branch rather than wait for the branch commit to change?

Yup! You’ll need to type in the non-typo branch name in allowed-branches-to-build, and create a dummy commit; we’ll notice the branch with the first commit.

Put another way - we don’t need to know about it before you create it; we will start building with the next commit once you configure us to do so.

After the first successful build, you can create the branch subdomain as usual, no matter whether you “pre-authorized” the branch to build or not :slight_smile:

I hope this helps!