Hi! Do people have experience and best practices how to combine a Lerna monorepo with Netlifys branch-deploy feature, and according git strategies?
Let’s say we have a bunch of Packages like this.
components as a dependency. Packages are not pushed to any registry, but just used as local workspaces:
| packages/ | components/ | src/ | package.json | app/ | src/ | package.json | ... many other packages | package.json
In Netlify, we made a project and connected it to
app also is our base directory, so that now builds only get triggered if changes have been done to
However, what if we do a change to
components? Since it is a dependency of
app, it should also trigger a branch deploy of the later. One option would be to manually manage all the netlify ignore options for all of our websites, making sure builds also get triggered by changes of dependency packages. But thats no fun when dealing with a lot of packages!
Another option is using versions - if
components changes, we could use lerna to automatically bump versions. Now there actually is a change in
app (package.json changed), and the branch deploy would trigger. However, branch-deploys should be triggered on a lot of secondary branches all the time, while bumping versions on any branches that are not the primary branch is seens as a bad practice.
I am still new to Lerna, so I am sure there are best practices on how to deal with setups like this. Would love to hear what those are!