I am currently building a web app from
src folder to my local
dist folder. The
dist folder then gets deployed/uploaded to the production server. I currently do this using file transfer (SSH).
What I cannot understand or overcome is:
- Why does the entire
distfolder have to be uploaded to production for each minor change e.g. an update to a CSS file? I know that file names get hashed to invalidate caches, but isn’t there a better way to deploy minor changes than uploading the whole app over and over again?
- With each deployment of the
distfolder, any server-generated content like Google sitemaps are getting destroyed (a clean
distfolder each time is considered good practice). Everytime a change is deployed, all the server-generated content has to be remade again. Is there a way to deploy the
distfolder but keep server-generated files safe?
Does CI/CD help with the above issues?