Two sites/domain one code base - monorepo support

I can see now that Netlify supports monorepos which is awesome.

Is it possible to have multiple netlify sites building the same codebase/git repository? I can see that for monorepos to work each site would need to look at its own build directory, but if two sites are looking at the same directory is there some way to decipher between the two.

Netlify site | Domain | Codebase
netlify site-one | | my-git-repo
netlify site-two | | my-git-repo
netlify site-three | | my-git-repo

Maybe this description is a little fluffy? If so I will try and add some more to explain the issues I have.

If I understand your question correctly, yes, this can be done. I have several sites running off of the same GitHub repository, and Netlify handles each of them just fine.


I have it working with two test sites B and W but both sites build every branch/pull request.

Using the vue cli I am building them with different env files and it “works” but it feels like a hack. Was hoping there was something with the new monorepo change that might help

“build:b”: “vue-cli-service build --mode b --dest b”,
“build:wi”: “vue-cli-service build --mode w --dest w”,

Hi @Duncan, the monorepo support expects that each separate site lives in its own folder and the base directory setting tells our buildbot where to start from. The publish directory and such is now relative to that base directory. However, it probably doesn’t change the behavior when not using ‘base’.

One thing that might be useful to you is the ignore feature which will avoid unneeded deploys.

Hope that helps.