Skip to content

Instantly share code, notes, and snippets.

@fwartner
Created March 3, 2017 11:40
Show Gist options
  • Save fwartner/6ca42fe1cf09ee5e214258b1cf84eaf5 to your computer and use it in GitHub Desktop.
Save fwartner/6ca42fe1cf09ee5e214258b1cf84eaf5 to your computer and use it in GitHub Desktop.
Envoy Automation Template
@servers(['production' => 'forge@YOUR-SERVER', 'localhost' => '127.0.0.1'])
@story('production')
compile
deploy
@endstory
@task('compile', ['on' => 'localhost'])
cd ~/Development/Sites/YOUR-SITE
npm run production
@if ($commit)
git add . && git commit -am "{{ $commit }}"
@endif
git push origin master
@endtask
@task('vcs', ['on' => 'localhost'])
cd ~/Development/Sites/YOUR-SITE
@if ($commit)
git add . && git commit -am "{{ $commit }}"
@endif
git push origin master
@endtask
@task('deploy', ['on' => 'production'])
cd /home/forge/YOUR-SITE.TLD
php artisan down
git pull origin master
composer install
php artisan cache:clear
php artisan config:clear
php artisan view:clear
php artisan queue:flush
php artisan up
@endtask
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment