2017 © Pedro Peláez
 

library php-git-deploy

Git Deployment with PHP

image

appleboy/php-git-deploy

Git Deployment with PHP

  • Friday, May 16, 2014
  • by appleboy
  • Repository
  • 7 Watchers
  • 36 Stars
  • 32 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 9 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

PHP-Git-Deploy

Using Post-Receive Hooks to deploy muliple projects automatically. Build Status, (*1)

Ref: https://developer.github.com/webhooks/, (*2)

Requirements

PHP-Git-Deploy works with PHP 5.3 or later., (*3)

Installation via Composer

Create a composer.json file in your project root and use it to define simply your dependencies:, (*4)

{
    "require": {
        "appleboy/php-git-deploy": "1.0.*"
    }
}

Then install Composer in your project (or download the composer.phar directly):, (*5)

$ curl -s http://getcomposer.org/installer | php

And finally ask Composer to install the dependencies:, (*6)

$ php composer.phar install

Installation/Usage

Download files

Download and drag the following files into your application/ folder., (*7)

$ cp -r src/Web your_www/

Configure your profile

open src/Web/config.php file with your editor. Following is config formats., (*8)

$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:, (*9)

Your github project URL is https://github.com/appleboy/PHP-Git-Deploy, (*10)

The project_name value is PHP-Git-Deploy, don't case sensitive., (*11)

Please refer the following example profiles., (*12)

Single project, Multi branch profile
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
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/')
    )
);

Create New index.php

Create new file your_www/Web/index.php, copy the following source code and paste into index.php file., (*13)

<?php
require_once('Deplpoy.php');
$deploy = new \Web\Deploy;
$deploy->index();

Setting Webhook URL

Please refer the Post-Receive Hooks Helper page, (*14)

Webhook, (*15)

Author

Bo-Yi Wu (appleboy) appleboy.tw@gmail.com, (*16)

The Versions

16/05 2014

dev-master

9999999-dev https://github.com/appleboy/PHP-Git-Deploy

Git Deployment with PHP

  Sources   Download

BSD

The Requires

  • php >=5.3.0

 

php deploy

20/09 2012

1.0.0

1.0.0.0 https://github.com/appleboy/PHP-Git-Deploy

Git Deployment with PHP

  Sources   Download

BSD

php deploy