-
-
Save fibbarth/f141c2b97ac3060642b17996c541bb0d to your computer and use it in GitHub Desktop.
Simple Envoy script for Laravel deploy
This file contains hidden or 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' => 'username@hostname']) | |
@setup | |
$path = '/var/www/html' | |
@endsetup | |
@story('deploy') | |
git | |
composer | |
config | |
route | |
restart | |
@endstory | |
@task('git') | |
cd {{ $path }} | |
git reset --hard origin/master | |
git pull origin master | |
@endtask | |
@task('composer') | |
cd {{ $path }} | |
composer install --optimize-autoloader --no-dev | |
@endtask | |
@task('config') | |
cd {{ $path }} | |
php artisan config:cache | |
@endtask | |
@task('route') | |
cd {{ $path }} | |
php artisan route:cache | |
@endtask | |
@task('restart') | |
/etc/init.d/php7.2-fpm restart | |
@endtask |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment