Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var exec = require('child_process').execFileSync;
- var githubhook = require('githubhook');
- var github = githubhook({/* options */});
- function runCmd( cmd, args ){
- exec( cmd, args || [], { stdio: 'inherit' } );
- }
- github.listen();
- github.on('push:REPO_NAME:refs/heads/BRANCH1', function (event, repo, ref, data) {
- runCmd('git-pull.sh', '/home/user/reponame' );
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement