Skip to content

Commit

Permalink
Minify JS and CSS files on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
aag committed Nov 3, 2017
1 parent de54c29 commit 594b9dd
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions deploy.php
Expand Up @@ -35,6 +35,16 @@

// Tasks

task('deploy:npm_install', function() {
cd('{{release_path}}');
$output = run('npm install');
})->desc('Install npm modules');

task('deploy:npm_build', function() {
cd('{{release_path}}');
$output = run('npm run build');
})->desc('Build frontend assets');

task('deploy:fpm_restart', function () {
$output = run('sudo service php7.0-fpm restart');
})->desc('Restart PHP-FPM');
Expand All @@ -49,6 +59,8 @@
'deploy:shared',
'deploy:writable',
'deploy:vendors',
'deploy:npm_install',
'deploy:npm_build',
'deploy:clear_paths',
'deploy:symlink',
'deploy:fpm_restart',
Expand Down

0 comments on commit 594b9dd

Please sign in to comment.