Automatically deploy branches that match name pattern

Hi, @sarfata. I have escalated this issue to our developers to find out why it isn’t working as I’m baffled.

I even did a byte by byte hexdump of the my netlify.toml and yours in case there was some hidden unprintable characters (which sometimes happens). However, the two entries are identical:

$ hexdump theirs.txt
0000000 5b 63 6f 6e 74 65 78 74 2e 64 65 70 6c 6f 79 2d
0000010 70 72 65 76 69 65 77 5d 0a 20 20 69 67 6e 6f 72
0000020 65 20 3d 20 22 74 72 75 65 22 0a 0a
000002c
$ hexdump mine.txt
0000000 5b 63 6f 6e 74 65 78 74 2e 64 65 70 6c 6f 79 2d
0000010 70 72 65 76 69 65 77 5d 0a 20 20 69 67 6e 6f 72
0000020 65 20 3d 20 22 74 72 75 65 22 0a 0a
000002c

Byte for byte identical. It just doesn’t make sense to me. :sob:

So, there must be something else happening but I don’t know what. We will post an update here as soon as we hear back from our developers about this.

Hey @sarfata,
We dug into this and see that your site was created before we rolled out monorepo support and the ignore command. Would you be willing to try deploying the same repo and config to a new site and letting us know if that works? If it doesn’t work, we have one more setting we can try on our end before going back to the drawing board!

@jen Good catch - it’s working with a new deploy.

Is there a way to upgrade my old site to the new one without losing my DNS config (DNS are managed by Netlify)? Or what is the best way to migrate the domain names from the old deploy to the new one?

Hi, @sarfata. Yes, you can get the new monorepo features on the existing site! The instructions are below:

  1. Navigate to the site’s “Build & deploy” settings ( found at Site Name > Settings > Build & deploy > Continuous Deployment).
  2. Click the “Link to different repository” link.
  3. Select the same repository you are already using.

This will destroy the existing repo definition in our database and create a new one. The new repo definition will have the new behavior.

If this doesn’t work or if there are any questions, please let us know.

Ok so in the end what works for me to ignore deploy-previews of the beta branch is:

[context.deploy-preview]
  ignore = '''
if [ "$HEAD" == "beta" ] && [ "$CONTEXT" == "deploy-preview" ]; then
  return 0
else
  return 1
end
'''
1 Like

thank you for sharing!