Ignore toml File or Deploy Multiple Projects from Monorepo

I have a monorepo that has two web projects: a landing page and a web application. For the web application, I needed to use the netlify.toml file to configure redirects and set up my lambdas, but the landing page is a super simple Gatsby site.

Here’s my issue, I want to deploy both of these to Netlify, and it’s cool if they’re separate projects. However, the toml file always takes precedence over the build steps I setup in the UI which is not what I want for the landing page. This is what I’m looking for:

Web App: Uses netlify.toml
Landing Page: Ignores toml file and uses the build command I put into the UI

My workaround right now is using Firebase hosting for the landing page, but I want to be able to A/B test and hook up Netlify CMS using Netlify Identity. Open to other ideas as well, I read here about struggles with monorepos, but was hoping there’s been progress after seeing the monorepo announcement.

Thanks!
Marcus

Hello @mwood23, have you tried setting a base directory for your web app in the site’s deploy setttings and then putting the netlify.toml file in that project’s folder? This is possible with the monorepo feature recently released. Let me know if that works for you.

Hey @Dennis, that won’t work for our use case because the monorepo is built with Lerna and Yarn Workspaces. There’s only one yarn.lock file for the entire project and when I add a netlify.toml file to a particular project’s folder I can’t install from the lockfile.

Yea, I don’t think the monorepo feature currently work well with yarn workspaces. The only thing I can suggest would be to split your landing page out to its own repo. Otherwise, you might need to handle the different build command in a custom script somehow (maybe using an env var set in the site’s dashboard and using that to know what to do during the build). Hope that helps.