Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1.  
  2. var exec = require('child_process').execFileSync;
  3. var githubhook = require('githubhook');
  4. var github = githubhook({/* options */});
  5.  
  6. function runCmd( cmd, args ){
  7. exec( cmd, args || [], { stdio: 'inherit' } );
  8. }
  9.  
  10. github.listen();
  11.  
  12. github.on('push:REPO_NAME:refs/heads/BRANCH1', function (event, repo, ref, data) {
  13. runCmd('git-pull.sh', '/home/user/reponame' );
  14. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement