Execute 'npm install', 'bower install' and 'gulp build' on deployment

I’m using Bedrock, Trellis and Sage for my WordPress development and deployment workflow.

My Sage-based theme is included in my Bedrock repo. I can deploy the site however the theme doesn’t get built in the deployment script.

What is the best practice for running npm install, bower install and gulp build from within my theme directory at the end of the Trellis deployment process?

1 Like

See https://github.com/roots/trellis/blob/master/deploy-hooks/build-before.yml

Working example https://github.com/roots/roots-example-project.com