So in my daily work we have to update or amend websites frequently.
We use GitBucket for our repos and have a cloud based WHM/cPanel hosting setup. We’re new to Sage and our normal process before sage was to locally work on the site running webpack etc and this would compile any SCSS and JS and update a build directory etc. We would then simply push our changes to the repo and then SSH into the staging/production and do a git pull.
With Sage 9 the dist folder is ignored so doing this isn possible. I am currently doing what I feel is a backwards step…
After running yarn build:production locally I zip up the dist folder which is added to the theme folder and commit/push to the repo which I then have to unzip to overwrite the existing dist folder on staging/production after doing a git pull.
I’ve read the docs and search for better solutions but have found nothing that would make deploying to staging or production a easier/more normal process.
Does anyone else have a better way that would fit more closely to our original process?
If you’re using git to deploy, what’s stopping you from removing dist from .gitignore and committing your build artifacts? Sage’s only objection to that is philosophical; it should work with the process you describe.