Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions Envoy.blade.php
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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