robloach / git-deploy
部署和管理git部署。
0.0.5
2015-02-08 14:36 UTC
Requires
- php: >=5.3.0
- cpliakas/git-wrapper: ~1.4.1
- symfony/console: ~2.6.4
README
通过PHP部署和维护多个git仓库。
需求
- PHP 5.4或更高版本
- Composer
安装
-
安装Composer
$ php -r "eval('?>'.file_get_contents('https://getcomposer.org.cn/installer'));"
-
使用Composer安装Git Deploy
$ php composer.phar create-project robloach/git-deploy
使用方法
-
创建一个
git-deploy.json
文件{ "mywebsite": "https://github.com/my/website.git", "myotherwebsite": { "repo": "https://github.com/my/otherwebsite.git" }, "mythirdwebsite": { "repo": "https://github.com/my/otherwebsite.git", "branches": [ "branch1", "branch2" ] }, "myfourthwebsite": { "repo": "https://github.com/my/otherwebsite.git", "branches": { "branch1": "path/to/destination/branch1", "branch2": "path/to/destination/branch2", "branch3": "path/to/destination/branch3" } } }
-
执行Git Deploy部署所有站点
gh-pages-deploy/bin/gh-pages-deploy deploy
-
设置cron作业以定期部署。
gh-pages-deploy/bin/gh-pages-deploy deploy
许可证
版权所有 © Rob Loach (http://robloach.net)