<?php require_once 'class.GitHubHook.php'; // Added by nate@bamads.com - server specific date_default_timezone_set('America/New_York'); ini_set('safe_mode', '0'); // Initiate the GitHub Deployment Hook; Passing true to enable debugging $hook = new GitHubHook(true); // TODO: Update branch names and path to files // Adding `develop` branch to deploy for `staging` to path `/path/to/directory/` $hook->addBranch('staging', 'staging', '/path/to/directory/'); // Deploy the commits $hook->deploy();
<?php require_once 'class.GitHubHook.php'; // Initiate the GitHub Deployment Hook $hook = new GitHubHook(); // Enable the debug log (sent to error_log) $hook->enableDebug(); // Adding `stage` branch to deploy for `staging` to path `/var/www/testhook/stage` $hook->addBranch('stage', 'staging', '/var/www/stage'); // Adding `prod` branch to deploy for `production` to path `/var/www/testhook/prod` limiting to only `user@gmail.com` $hook->addBranch('prod', 'production', '/var/www/prod', array('*****@*****.**')); // Deploy the commits $hook->deploy();
<?php require_once 'class.GitHubHook.php'; // Initiate the GitHub Deployment Hook $hook = new GitHubHook(); // Enable the debug log, kindly make `log/hook.log` writable $hook->enableDebug(); // Adding `stage` branch to deploy for `staging` to path `/var/www/testhook/stage` $hook->addBranch('master', 'master', '/opt/KDE-Taiwan/kde/'); // Adding `prod` branch to deploy for `production` to path `/var/www/testhook/prod` limiting to only `user@gmail.com` //$hook->addBranch('prod', 'production', '/opt/KDE-Taiwan/kde/prod', array('*****@*****.**')); // Deploy the commits $hook->deploy();