Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
namespace Deployer;
$startTime = microtime(true);
require 'recipe/common.php';
// Project name
set('application', 'xxx');
// Project repository
set('repository', '');
// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', true);
// Shared files/dirs between deploys
set('shared_files', [
set('shared_dirs', []);
// Writable dirs by web server
set('writable_dirs', []);
// Hosts
set('branch', 'production');
->set('deploy_path', '/var/www/{{application}}');
->set('deploy_path', '/var/www/{{application}}');
// Tasks
task('notify:done', function () use ($startTime) {
$seconds = intval(microtime(true) - $startTime);
$minutes = substr('0' . intval($seconds / 60), -2);
$seconds %= 60;
$seconds = substr('0' . $seconds, -2);
shell_exec("osascript -e 'display notification \"It took: $minutes:$seconds\" with title \"Deploy Finished\"'");
desc('Deploy your project');
task('deploy', [
// [Optional] If deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment