A php tiny http server for auto pull with a git remote
-
clone this repo.
-
go to the repo's settings page and set "URL", "Secret Token"
-
copy the server's public_key to git_remote's integration_key field
-
edit 'gitlab.webhook.autopull.php' as follows
$exec_pair = [
"secret-token"
=>
"cd /path/to/the/project && git pull"
];
- exec the following command as daemon
php -S listen.to.address:port gitlab.webhook.autopull.php