4

Can I use Fabric to automatically deploy an app on my server every time I push the code to GitHub? (GitHub has the ability to POST to a URL every time I push.)

If so, how?

Ram Rachum
  • 5,011
  • 6
  • 33
  • 44

2 Answers2

0

Sure. It's not a real good idea, but it's possible. Just setup something on a URL you control that when it receives the POST from Github, it runs your fabric script. You could use any sort of CGI/FCGI/WSGI/whatever to do this; even a couple of lines of PHP would be enough to get things underway.

womble
  • 95,029
  • 29
  • 173
  • 228
  • 1
    Why is it not a good idea? I've been hearing this opinion in several places but haven't seen an explanation yet. – Ram Rachum Sep 05 '11 at 18:11
  • 2
    Because the commit is not a good unit of measure for a deployment. If you start using one as a proxy for the other, you encourage abberant and counter-productive behaviour. – womble Sep 07 '11 at 01:20
0

Yes, There some plugins could integrate to Github. Details : https://developer.github.com/webhooks/

Also, In the Fabric side, you could trigger it by a Github web hook request. If you don't want implement a website to do this, maybe you can try the jenkins and its plugin.

Dreampuf
  • 101
  • 2