-
Notifications
You must be signed in to change notification settings - Fork 352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 16.3.3: netlify deploy in monorepo with --dir flag deploys entire project root #6000
Comments
The issue does not occur when using Tbh, I'm more than a little annoyed that our private monorepo and |
Thanks for creating this detailed issue I'm so sorry you accidentally published your whole repo. If there is anything we can assist you here please feel free to send me a mail to lukas.holzer@netlify.com I'm currently trying to replicate it with a simple example and be back in some minutes to you hopefully with an answer |
A quick way in the meanwhile, until I'm able to push a fix out today, is to use the internal
This basically treats the site as if it would be a non monorepo simple netlify located in this directory |
The fix is released in 16.3.4 @South-Paw please let us know if something is not working as expected |
Thanks, will sing out if problems |
Describe the bug
With a
--filter
flag set, the root of the project is being deployed (src and all) instead of the specified--dir
And adjacent to that, the deploy command requires a
--filter
flag despite a--dir
flag being provided?Steps to reproduce
We have a monorepo project (using npm workspaces) with the following structure
To deploy we were using the following in a GitHub workflow (from the project root):
npx netlify-cli deploy --prod --dir ./apps/app-1/dist
However, this broke in CI with 16.x introducing the
--filter
arg. The command started failing as it prompts for the "the site you want to work with" despite us having set an explicit--dir
🤔So we added:
npx netlify-cli deploy --prod --dir ./apps/app-1/dist --filter @example/app-1
As was suggested by the deploy commands output without the
--filter
argBut now we've now realized after setting
--filter @example/apps-1
flag to resolve the failed command, the Netlify CLI is deploying our entire project to the Netlify site (src directories, .json files, md files) instead of the specified--dir
.We confirmed this by downloading a zip from the site only to find our repo in there.
I've reproduced on my local machine with a similar setup and specifying v16.3.3
npx netlify-cli@16.3.3 deploy --prod --dir ./apps/app-1/dist --filter @example/app-1
Possibly related is #5966
Configuration
No response
Environment
the issue exists on a GitHub action workflow
The text was updated successfully, but these errors were encountered: