New to web development, and have been utilizing a git repository for my wordpress website. I maybe over thinking this but here goes...
Currently, my workflow is as follows:
- Make changes locally and commit to dev branch
- Create release tags for appropriate site versions
- Deploy tag on staging, then to production.
When working on my local machine, URLs to images are on the local box. When I am happy with a release, I upload these images (compressed, resized) to an an S3 bucket, but this also involves going back and updating their src in any code.
There are lots of .css files, for my theme, and all the installed plugins. I was thinking about using Grunt/Gulp to minify all of this, along with concatenation. Then, store these files to an S3 bucket, similar to the images.
After minification, wouldn't I have to update all the references in the plugin/other PHP files to include the "min" version of it?
What are the benefits (if any), of minifying before deployment vs. using a plugin to do it, after deployment?