In the suggested deploy script doesn't take into account the site

If there are multiple sites managed by a team, the suggested script to deploy is misguiding.
E.g. on it suggests to use
layer0 deploy --team=[team_name] --environment=production
instead of
layer0 deploy --team=[team_name] --site=[site_name] --environment=production
this could lead to deploying to the wrong site :exclamation:

The default behavior is the site name is inferred from the name property in package.json, which is why it’s not a suggested as a necessary argument for the deploy command.

If you have 2 different projects with the same name value and are attempting to deploy them to the same team, then you risk deploying incorrectly. So long as the projects have unique names, this should not be an issue.

Is there a use case I may not be covering?

1 Like

The package.json name was the cause of the issue for me. I had copied it over from a sibling site and didn’t change the name. Thanks for the clarification.