Skip to content

Instantly share code, notes, and snippets.

@zofe
Last active December 1, 2015 14:24
Show Gist options
  • Save zofe/21bd5ac8ff83f01f3c07 to your computer and use it in GitHub Desktop.
Save zofe/21bd5ac8ff83f01f3c07 to your computer and use it in GitHub Desktop.
@servers(['web' => 'nomeutente@professionisti.it', 'local'=>'localhost'])
<?php
$repo = 'public_html/stage/';
?>
@task('commit', ['on'=>'local'])
git add .
git commit -m "auto"
git push origin master
@endtask
@task('pull', ['on'=>'web'])
cd {{$repo}}
git pull origin master
@endtask
@task('update', ['on'=>'web'])
cd {{$repo}}
composer update
@endtask
@task('graceful', ['on'=>'web'])
{{-- /etc/init.d/httpd graceful --}}
/usr/bin/php {{ $repo }}/cachetool.phar opcache:reset --fcgi=/var/run/php5-fpm.sock
@endtask
@task('clear', ['on'=>'web'])
cd {{$repo}}
php artisan clear-compiled
php artisan route:clear
@endtask
@task('optimize', ['on'=>'web'])
php artisan optimize --force
php artisan route:cache
@endtask
@macro('deploy')
{{--commit--}}
pull
clear
optimize
graceful
@endmacro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment