Im looking to add a few commands to the final build process. One is pre final build – minifying js and css. The other is post-build – rsync or scp the public folder to a remote machine.
Is there a method for spawning a console command in the process. Makefile,Bash or whatever is needed
I do not believe so, I asked about this in the past, you can see how I handle minification in the Abridge theme if it helps. I basically put my minification commands into an npm script (package.json).
The npm script handles minification as well as bundling js files, etc.
I had planned to make a more dynamic way of specifying which features to include, you can see there are a lot of different npm scripts that can be ran within the package.json, this is to support different options and combinations of the theme. I think some sort of option matrix would be better, where I have a list of features that can be set to true or false, and the script takes it from there, but for my purposes it works for now. I am far to busy at the moment to work on it. (only noticed this question because I’m subscribed to the Zola forum newsletter)
Also heres a bash script you could use for manual deployment, no time to explain it at the moment, but if your familiar with linux you can probably tell what im doing:
Oh also, the abridge demo is hosted on netlify, and they support using npm build, so if you want to automate your site from a git repo then you totally can. that is how this site gets built: