robloach/git-deploy

部署和管理git部署。

安装: 13

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 0

开放问题: 0

类型:项目

0.0.5 2015-02-08 14:36 UTC

This package is auto-updated.

Last update: 2024-09-10 08:38:51 UTC


README

通过PHP部署和维护多个git仓库。

需求

安装

  1. 安装Composer

    $ php -r "eval('?>'.file_get_contents('https://getcomposer.org.cn/installer'));"
  2. 使用Composer安装Git Deploy

    $ php composer.phar create-project robloach/git-deploy

使用方法

  1. 创建一个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"
          }
        }
    }
  2. 执行Git Deploy部署所有站点

    gh-pages-deploy/bin/gh-pages-deploy deploy
  3. 设置cron作业以定期部署。

    gh-pages-deploy/bin/gh-pages-deploy deploy

许可证

在极其宽泛的 MIT许可证下授权

版权所有 © Rob Loach (http://robloach.net)