Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jackpittenger on github.
  • I am anonmoose (https://keybase.io/anonmoose) on keybase.
  • I have a public key whose fingerprint is AA29 757C 6240 C05E 1D8B C742 4C87 1CED B48E 823D

To claim this, I am signing this object:

@jackpittenger
jackpittenger / github_webook.js
Created January 10, 2020 02:50
Example webhook for processing on-push updates from GitHub in Node.js
//github.com/realSaddy
// This uses pm2 by default, feel free to change any of the pipeline commands
const secret = "";
const repo = "/location";
const branch = "master"
const pipeline = [
'pm2 stop server',
'cd ' + repo + ' && git pull origin master',
`cd `+repo+` && npm install`,
`cd `+repo+` && pm2 restart server`