Skip to content

Commit

Permalink
πŸš€ Update deploy.php
Browse files Browse the repository at this point in the history
  • Loading branch information
jbelien committed Dec 16, 2022
1 parent 621e43a commit 3d595e6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion deploy.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,20 @@
->set('remote_user', 'root')
->set('deploy_path', '/var/www/mapfile');

// Tasks

task('npm:build', function () {
runLocally('npm install');
runLocally('npm run build');
});
task('npm:rsync', function () {
runLocally('rsync -e ssh -az public/css/ {{remote_user}}@{{hostname}}:{{release_path}}/public/css/');
runLocally('rsync -e ssh -az public/js/ {{remote_user}}@{{hostname}}:{{release_path}}/public/js/');
});
task('npm', ['npm:build', 'npm:rsync']);

// Hooks

after('deploy:update_code', 'npm');
after('deploy:failed', 'deploy:unlock');
after('deploy', 'php-fpm:reload');
after('deploy:success', 'php-fpm:reload');

0 comments on commit 3d595e6

Please sign in to comment.