Last active
December 1, 2015 14:24
-
-
Save zofe/21bd5ac8ff83f01f3c07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@servers(['web' => '[email protected]', '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