/GitDeploy

Auto git pull for your projects

Primary LanguageShellMIT LicenseMIT

GitDeploy

Auto git pull for your projects.

Install

cd ~

Clone GitDeploy:

git clone https://github.com/Shchepotin/GitDeploy.git mygitdeploy
cd mygitdeploy

Copy and rename config file:

cp config.conf.sample config.conf

Edit:

nano config.conf

Run

cd /path/to/your/web/site

Create webhook.php in your project:

nano webhook.php
<?php

putenv("HOME=/home/YOUR_USER_NAME"); // Required

exec("nohup bash /path/to/gitdeploy/webhook.sh >> /path/to/gitdeploy/webhook.log 2>&1 &");

Github

In your repository go to Settings > Webhooks > Add webhook and set Payload URL:

http://yoursite.com/webhook.php

And press button Add webhook

Bitbucket

In your repository go to Settings > Webhooks > Add webhook and set URL:

http://yoursite.com/webhook.php

And press button Save