A Github webhook implemention written by Go
You can use "github-webhook" binary executable file to receive the notification when your github project trigger the push event. Once you can receive the push event,you can deploy the website project auto.
- build from source
git clone https://github.com/jiangkang/github-webhook.git
cd github-webhook
go build- create the hook_config.json in the same path of the github-webhook binary
{
"path_repo" : "/var/www",
"port": "5678"
}
-
in path_repo directory mentioned above,you have to git pull the website project from github
-
execute the script
./github-webhook
- add webhook info in your github project
url : "yourdomain/payload"
such as :
https://jiangkang.tech/payload