Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Git Deploy For Github
#1

[eluser]appleboy[/eluser]
Source Project : https://github.com/appleboy/PHP-Git-Deploy

CodeIgniter-Git-Deploy

Using Post-Receive Hooks to deploy muliple projects with CodeIgniter automatically.

Ref: https://help.github.com/articles/post-receive-hooks

Installation/Usage

Download files from https://github.com/appleboy/PHP-Git-Depl...odeigniter

Download and drag the following files into your application/ folder.

Code:
$ cp config/github.php application/config/
$ cp controllers/deploy.php application/controllers/

Configure your profile

open application/config/github.php file with your editor. Following is config formats.

Code:
$config['github'] = array(
    'project_name' => array(
        'branch_name' => array('base_path' => 'folder_path')
    )
);

project_name must be the same with your github project name, for example:

Your github project URL is https://github.com/appleboy/PHP-Git-Deploy

The project_name value is PHP-Git-Deploy, don't case sensitive.

Please refer the following example profiles.

Single project, Multi branch profile

Code:
array(
    'php-git-deploy' => array(
        'master' => array('base_path' => '/path/PHP-Git-Deploy_1/'),
        'develop' => array('base_path' => '/path/PHP-Git-Deploy_2/')
    )
);
Multi project, Multi branch profile

Code:
array(
    'php-git-deploy' => array(
        'master' => array('base_path' => '/path/PHP-Git-Deploy_1/'),
        'develop' => array('base_path' => '/path/PHP-Git-Deploy_2/')
    ),
    'codeigniter-my-model' => array(
        'master' => array('base_path' => '/path/CodeIgniter-MY-Model_1/'),
        'develop' => array('base_path' => '/path/CodeIgniter-MY-Model_2/')
    )
);

Setting Webhook URL

Please refer the Post-Receive Hooks Helper page

[Image: 7836097364_d7629b427c_z.jpg]


Messages In This Thread
CodeIgniter Git Deploy For Github - by El Forum - 08-23-2012, 11:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB