robloach/git-deploy

Deploy and manage git deployments.

0.0.5 2015-02-08 14:36 UTC

This package is auto-updated.

Last update: 2024-10-10 08:49:55 UTC


README

Deploy and maintain a number of git repositories through PHP.

Requirements

Installation

  1. Install Composer:

    $ php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
  2. Use Composer to install Git Deploy:

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

Usage

  1. Create a git-deploy.json file:

    {
        "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. Execute Git Deploy to deploy all sites:

    gh-pages-deploy/bin/gh-pages-deploy deploy
  3. Set up a cron job to deploy every once in a while.

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

License

Licensed under the incredibly permissive MIT license

Copyright © Rob Loach (http://robloach.net)