IPcalc-u-later/deploy.php
2024-11-26 08:42:01 +01:00

51 lines
1 KiB
PHP

<?php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', 'Bit');
// Config
set('repository', 'git@git.maartenvr98.nl:maartenvr98/IPcalc-u-later.git');
set('git_tty', true);
set('keep_releases', 5);
set('writable_mode', 'chmod');
add('shared_files', ['.env']);
add('shared_dirs', []);
add('writable_dirs', []);
// PHP
set('bin/php', function () {
return '/usr/bin/php8.3';
});
// Hosts
host('bit.maartenvr98.nl')
->set('remote_user', 'maartenvr98-bit')
->set('deploy_path', '/home/maartenvr98-bit/htdocs/bit.maartenvr98.nl')
->set('branch', 'main');
// Tasks
task('assets:build', function () {
runLocally('yarn install && yarn build');
});
task('assets:upload', function () {
upload('public/dist', '{{release_path}}/public');
});
// Main deploy task
desc('Deploy your project');
task('deploy', [
'deploy:prepare',
'deploy:vendors',
'assets:build',
'assets:upload',
'deploy:publish',
]);
// Hooks
after('deploy:failed', 'deploy:unlock');