deployment - How do you trigger a gulp/grunt task on a remote server after deploy? -


i've switched roots sage starter theme wordpress: roots.io/sage/docs/ , i'm reading on deployment processes.

my processes usually: - make changes - build grunt/gulp - commit (including compiled scripts) - deploy

sage's .gitignore file removes dist folder (compiled files) repo ie. no css/js in repo. supposed install node/npm , build assets on staging/production environment after deploy? if so, how trigger gulp/grunt task on remote server after deploy?

i'm using https://www.springloops.com/ managing git , deploy.

are supposed install node/npm , build assets on staging/production environment after deploy?

you should avoid doing this. there mixed opinion committing compiled assets vcs stated doing previously, too.

let's @ example.

you finished testing locally. haven't run npm update in few days , 1 of dependencies has loose version constraint specified; "~1.0.0".

you deploy. on server, npm install run before gulp or grunt. gulp runs, build of assets completes successfully, , new version of app live.

unknown you, version 1.0.1 of dependency released yesterday. whatever reason, 1.0.1 introduced change breaks functionality within app. that breaking change live on site in production.

even if guarantee dependencies pulled npm install on server mirror had locally/in staging, headache of maintaining yet set of software on server (node.js, ruby, etc...) just compiling assets should enough keep doing compilation on in production.

imo, should keep compiled assets out of vcs, , rsync them server(s) part of deployment.


Popular posts from this blog