Thank you for your patience. In this article, sls deploy deploys service (your project) to the dev stage, which is defined in the deployment.yml file. The .env file is not used at all here.
However, since writing this article, I have updated the project on GitHub and right now sls deploy deploys the service to a dev stage which is dedicated to a particular developer. It uses your username taken from your computer and creates service-dev-username deployment. In that way, many developers can work in parallel on a single project.
Thank you for your patience. In this article,
sls deploydeploys service (your project) to thedevstage, which is defined in thedeployment.ymlfile. The.envfile is not used at all here.However, since writing this article, I have updated the project on GitHub and right now
sls deploydeploys the service to adevstage which is dedicated to a particular developer. It uses your username taken from your computer and createsservice-dev-usernamedeployment. In that way, many developers can work in parallel on a single project.More on that can be found in the documentation, section Deployment
Though, you can still deploy to other stages by explicitly providing stage value
sls deploy -s <stage> # stage = dev | test | prod