PHP code example of techsemicolon / gitdeployer

1. Go to this page and download the library: Download techsemicolon/gitdeployer library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

techsemicolon / gitdeployer example snippets



return [

    // Specify full absolute path of git dir
    // This will help if your .git folder is not inside the working directory
    // The value of this will be passed like `git pull --git-dir=/your/path/repo.git`
    // This is optional
    'dir' => env('GIT_DIR', null),

    // This the name of script to run before running main deployment script
    // The script files should be inside webhookscripts folder
    // This is optional
    'before_script' => env('GIT_BEFORE_SCRIPT', null),
    
    // This the name of script to run after running main deployment script
    // The script files should be inside webhookscripts folder
    // This is optional
    'after_script' => env('GIT_AFTER_SCRIPT', null),
    
    // These are the official bitbucket IP addresses
    // which needs to be whitelisted
    // This is 


namespace Techsemicolon\Gitdeployer\Events;

class GitWebhookDeployFailed
{
    public $error;

    /**
     * Create a new event instance.
     *
     * @param  string  $error
     * 
     * @return void
     */
    public function __construct($error)
    {
        $this->error = $error;
    }