WebFaction
Community site: login faq

I'l like to have a setup where a git repo hosted on Webfaction automatically does a "pull" whenever a commit is made to a GitHub repo.

I see in this older discussion, the advice was to do a cron job. This is not appealing to me because I want to see the results immediately, and I won't be doing very many commits to the GitHub repo, so the cron job would be running for weeks on end for no reason.

I see on GitHub that they want you to use some kind of web hook, but I'm not sure how/if that can be set up here.

asked 28 Jun, 15:33

derekvan's gravatar image

derekvan
64
accept rate: 0%

edited 28 Jun, 15:33


On the WebFaction side, the hook can be a simple website hosting a script that does the pull for you.

For example, you could use set up a static/cgi/php site with this ths PHP script (changing /srv/www/git-repo/ to /home/you/webapps/whatever) and then use http://yourdomain.com/github_post_recieve.php as the payload URL.

More info is available in GitHub Webhooks documentation.

Hope that helps!

permanent link

answered 29 Jun, 00:33

seanf's gravatar image

seanf ♦♦
11.6k21333
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×106
×7

question asked: 28 Jun, 15:33

question was seen: 102 times

last updated: 29 Jun, 00:33

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM