What you're after is git hooks, specifically the post-recieve hook. look in your .git directory and there is a folder called hooks. Inside there are files that are basically shell scripts.
I would write a shell script to trigger your gulp command, test it, make sure it works, and then hook it up to your post-receive git hook like so...
!/bin/bash
path/to/your/shell-script.sh
Now whenever your repo on your server recieves changes, that shell script will run and do whatever needs to be done.
What you're after is git hooks, specifically the
post-recieve
hook. look in your.git
directory and there is a folder calledhooks
. Inside there are files that are basically shell scripts.I would write a shell script to trigger your gulp command, test it, make sure it works, and then hook it up to your
post-receive
git hook like so...!/bin/bash
path/to/your/shell-script.sh
Now whenever your repo on your server recieves changes, that shell script will run and do whatever needs to be done.
Here is a more thorough guide: https://www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks