Skip to content

Commit

Permalink
update deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-kamil committed Sep 21, 2023
1 parent da7229b commit a547347
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,23 @@
->set('deploy_path', '/home/igo.sk/private/mkg-ornament');

// Tasks

task('build', function () {
run('cd {{release_path}} && {{bin/npm}} run build');
});
cd('{{release_path}}');

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');
run('npm ci && npm run build');
});

// Migrate database before symlink new release.
desc('Composer dump autoload');
task('composer:dump:autoload', function () {
run('cd {{release_path}} && composer dump-autoload');
});

before('deploy:symlink', 'artisan:migrate');
desc('Creates the symbolic links configured for the application');
task('artisan:storage:link', artisan('storage:link --relative', ['min' => 5.3]));

after('deploy:update_code', 'npm:install');
after('deploy:shared', 'build');
// Hooks
before('artisan:migrate', 'artisan:cache:clear');
before('artisan:migrate', 'composer:dump:autoload');
after('deploy:vendors', 'build');
// after('deploy:symlink', 'artisan:queue:restart');
after('deploy:failed', 'deploy:unlock');

0 comments on commit a547347

Please sign in to comment.