set('hostname', 'vps.benjamyn.love') ->set('port', '22') ->set('remote_user', 'root') ->set('deploy_path', '/opt/PriceyBotPanel'); // Tasks task('npm:build', function () { $command = match (get('alias')) { 'production' => 'production', 'staging' => 'development', default => 'production' }; run("cd {{release_path}} && {{bin/npm}} run {$command}"); }); task('perm:fix', function () { run("chown -R nginx:nginx /opt/PriceyBotPanel/{current,release,shared}"); }); // Hooks after('deploy:vendors', 'npm:install'); after('npm:install', 'npm:build'); after('npm:build', 'perm:fix'); after('deploy:failed', 'deploy:unlock');