library webhook-deploy
github webhook with php
brittyu/webhook-deploy
github webhook with php
- Monday, June 13, 2016
- by brittyu
- Repository
- 1 Watchers
- 4 Stars
- 2 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
webhook-deploy
把这个脚本放在服务器中,当github中的项目得到更新时,
github的hook发送一个post请求给设置好的url,
然后通过运行脚本实现服务器的同步github上的数据。, (*1)
使用方法
通过composer安装, (*2)
{
"require": {
"brittyu/webhook-deploy": "dev-master"
}
}
添加自己的配置文件config.php, (*3)
<?php
return $config = [
'base_dir' => __DIR__,
'log_name' => 'webhook.log',
'xiestorewebhook' => [
'remote' => "origin",
'branch' => 'master',
'path' => '/your/server/path/',
'secret' => 'your-key'
]
];
添加启动脚本, (*4)
<?php
include "vendor/autoload.php";
use Webhook\Github;
use Webhook\ResolvePost;
$config = require_once "config.php";
$hook = new Github($config, new ResolvePost);
$hook->execute();
更多信息
My blog, (*5)
License
MIT, (*6)
dev-master
9999999-dev
github webhook with php
Sources
Download
MIT
The Requires
by
brittyu