diff --git a/deploy.php b/deploy.php index d3447b3..3b55a71 100644 --- a/deploy.php +++ b/deploy.php @@ -1,13 +1,13 @@ set('deploy_path', '~/{{application}}'); - +host('beta.xn--pflnz-ira.li') + ->user('lq5xi_thisfro') + ->set('deploy_path', '~/sites/{{application}}'); + +set('http_user', 'uid153060'); + // Tasks -task('build', function () { - run('cd {{release_path}} && build'); +task('upload:build', function() { + upload('public/build/', '{{release_path}}/public/build/'); }); +// Build yarn locally +task('deploy:build:assets', function (): void { + run('yarn install'); + run('yarn encore production'); +})->local()->desc('Install front-end assets'); + +before('deploy:symlink', 'deploy:build:assets'); + +// Upload assets +task('upload:assets', function (): void { + upload(__DIR__.'/public/build/', '{{release_path}}/public/build'); +}); + +after('deploy:build:assets', 'upload:assets'); + // [Optional] if deploy fails automatically unlock. after('deploy:failed', 'deploy:unlock'); // Migrate database before symlink new release. - before('deploy:symlink', 'database:migrate'); -