Skip to content

Instantly share code, notes, and snippets.

@fosron
Created November 3, 2016 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fosron/0ef9e0b6fd34440040f9d9fd261da187 to your computer and use it in GitHub Desktop.
Save fosron/0ef9e0b6fd34440040f9d9fd261da187 to your computer and use it in GitHub Desktop.
Envoy simple deploy script
@servers(['web' => 'user@server.com'])
@setup
$dir = '/var/www'
@endsetup
@task('deploy')
cd {{ $dir }};
echo Putting website in maintenance
php artisan down
echo Git pull
git reset --hard HEAD
git pull
echo Migrating
php artisan migrate --force
echo Installing composer updates
composer update
{{--echo Bower...--}}
{{--bower install --quiet --allow-root--}}
echo Gulp...
gulp
echo Clearing the cache
php artisan cache:clear
echo Website is back up!
php artisan up
@endtask
@task('pull')
cd {{ $dir }};
echo Putting website in maintenance
php artisan down
echo Git pull
git reset --hard HEAD
git pull
echo Website is back up!
php artisan up
@endtask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment