Merge pull request 'Use deployer 7.x' (#27) from develop into master

Reviewed-on: thisfro/pflaenz.li#27
This commit is contained in:
Jannis Portmann 2023-02-08 17:13:35 +01:00
commit d2612882c8

View file

@ -1,7 +1,7 @@
<?php
namespace Deployer;
require 'recipe/symfony4.php';
require 'recipe/symfony.php';
// Project name
set('application', 'pflaenz.li');
@ -13,11 +13,11 @@ set('repository', 'ssh://git@git.thisfro.ch:222/thisfro/pflaenz.li.git');
set('git_tty', true);
set('bin/php', function() {
return '/opt/php8.0/bin/php';
return '/opt/php8.2/bin/php';
});
set('bin/composer', function() {
return '/opt/php8.0/bin/composer2';
return '/opt/php8.2/bin/composer2';
});
// Shared files/dirs between deploys
@ -28,14 +28,14 @@ add('shared_dirs', ['public/uploads']);
add('writable_dirs', []);
// Set composer options
set('composer_options', '{{composer_action}} --verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader --no-scripts');
set('composer_options', '--verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader --no-scripts');
// Hosts
host('beta.pflaenz.li')
->user('lq5xi_thisfro')
host('lq5xi.ftp.infomaniak.com')
->set('remote_user', 'lq5xi_thisfro')
->set('deploy_path', '~/sites/{{stage}}.{{application}}')
->set('http_user', 'uid153060')
->stage('beta');
->set('stage', 'beta');
// Tasks
@ -45,9 +45,9 @@ task('upload:build', function() {
// Build yarn locally
task('deploy:build:assets', function (): void {
run('yarn install');
run('yarn encore production');
})->local()->desc('Install front-end assets');
runLocally('yarn install');
runLocally('yarn encore production');
})->desc('Install front-end assets');
before('deploy:symlink', 'deploy:build:assets');