diff --git a/Envoy.blade.php b/Envoy.blade.php index fedad9ea..be2bf0bd 100644 --- a/Envoy.blade.php +++ b/Envoy.blade.php @@ -1,17 +1,21 @@ @servers(['local' => ['127.0.0.1'], 'server' => ['root@143.198.129.111']]) +{{-- Full deploy flow --}} @story('deploy', ['skipBackup' => false]) + build-frontend @if(!$skipBackup) backup-database @endif update-code install-dependencies + build-frontend down perform-migration - deploy-frontend + push-frontend up @endstory +{{-- ===== Backend Tasks ===== --}} @task('down', ['on' => 'server']) set -e cd /var/www/ComputerScienceResources.com @@ -48,12 +52,17 @@ php artisan migrate --force @endtask -@task('deploy-frontend', ['on' => 'local']) + +{{-- ===== Frontend Tasks ===== --}} +@task('build-frontend', ['on' => 'local']) set -e echo "Building frontend locally..." npm ci npm run build +@endtask +@task('push-frontend', ['on' => 'local']) + set -e echo "Copying compiled assets to server..." scp -r {{ __DIR__ }}/public/build root@143.198.129.111:/var/www/ComputerScienceResources.com/public @endtask