tags:

views:

88

answers:

2

I have a web app that serves some markdown files. What i would like to do is when there is a push to github i would ping my application using a webhook and i want my application to run git pull to retrieve changes. I am sure that no application specific files will change only markdown files in a specific folder.

  • Does any one done something like this?
  • Do you see any long term problems with this approach?
+1  A: 

http://www.kernel.org/pub/software/scm/git/docs/githooks.html

post-receive

Write a small script that will alert your java program somehow. Or even do the git pull in the script?

Pod
+3  A: 

Here's how to do it in Clojure (since you have a Clojure-tag on your question): http://infolace.blogspot.com/2009/08/simple-webhooks-with-clojure-and-ring.html

pmf