Set build script for non-prod branch deploys

Netlify Domain: filmsounds.netlify.app
Custom Domain: filmsounds.net

Build Settings

I am wanting to know if it is possible to have a different build script run on either branch deploys. I am using Gatsby and want to not have certain elements (like some meta tags) be dependant on whether its a node production build or not?

Use deploy contexts:

[build]
  command = "foo"

[context.branch-deploy.build]
  command = "bar"

Read here: File-based configuration | Netlify Docs

2 Likes