gitub_auto_pull is a small service listening for github push hook notifications, and updating the corresponding folder.
You need go to be installed.
go get -u github.com/yazgazan/github_auto_pull
Example :
github_auto_pull
# config.toml
Listen = ":8454"
# no default listen port
# repos.toml
# repo1_name should be the repository name on github
[[repo1_name]]
Folder = "./repo1_prod"
Remote = "origin"
Branch = "master"
# when triggered, the following shell command will be executed : `sh -c "cd './repo1_prod'; git pull 'origin' 'master'"`
[[repo1_name]]
Folder = "./repo1_test"
Remote = "origin"
Branch = "test"
[[repo2_name]]
Folder = "./repo2"
Remote = "origin"
Branch = "master"
To configure your github repository, you need to add this service address to the webhooks in the github settings (settings > webhooks & Serices > Add webhook). Be sure to leave the "Content type" field to application/json, the "Secret" field empty and the "Just the push event" checked.
- add support for the Secret