summaryrefslogtreecommitdiffstats
path: root/README.md
blob: c86eceec8ca159780f98865443d4f36f677ae37d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Git Deploy

Deploy and maintain a number of git repositories through PHP.


## Requirements

* PHP 5.4 or greater
* [Composer](http://getcomposer.org)


## Installation

1. Install Composer:

    ``` bash
    $ php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
    ```

2. Use Composer to install Git Deploy:

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


## Usage

1. Create a `git-deploy.json` file:

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

    ``` bash
    gh-pages-deploy/bin/gh-pages-deploy deploy
    ```

3. Set up a cron job to deploy every once in a while.

    ``` bash
    gh-pages-deploy/bin/gh-pages-deploy deploy
    ```


## License

Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://creativecommons.org/licenses/MIT/)

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