I am using Angular-cli created an angular project in my server, for example "myNgProject" . And set the ngnix root location to myNgProject/dist. Everything is good. I manage the project version with git, so every time I pull the new update from github, I need to rebuild the output files in server, I do that with command
ng build --prod
But dist folder will be removed first During the rebuilding process. So in this moment my site will gone also. Any one has some idea for this issue? Thank you.