I have a Git workflow where I'm pushing my Git updates to a bare repo which triggers the following post-receive hook:
#!/bin/sh
git --work-tree=/home/website/stage/public_html --git-dir=/home/website/stage/website.git checkout -f
cd /home/website/stage/public_html/wp-content/themes/theme/src/js/
npm install
gulp
This installs my npm packages from package.json file, but the gulp command doesn't work. Says 'command not found'.
I don't know if this is the proper way to build my dist/ folder with gulp? Even when I SSH into the server and try running npm install and gulp it still produces the same error. I am running on a CentOS server.
Thanks in advance.