new deployer command

This commit is contained in:
Mark Gregory
2026-09-16 12:11:57 +01:00
parent 4375fc729f
commit 16fe344eef
2 changed files with 37 additions and 5 deletions
+5 -4
View File
@@ -2,7 +2,7 @@
namespace Deployer;
require 'recipe/laravel.php';
require_once 'recipe/laravel.php';
set('writable_use_sudo', true);
set('clear_use_sudo', true);
@@ -13,6 +13,7 @@ set('node_version', '22.12.0');
set('allow_anonymous_stats', false);
const RELEASE_CD = 'cd {{release_path}} && ';
const RELEASE_AND_CD = ' && cd {{release_path}}';
const DEPLOY_SYMLINK = 'deploy:symlink';
add('shared_files', ['.env']);
@@ -50,13 +51,13 @@ task('build', function (): void {
run(
$node
. ' && cd {{release_path}}'
. RELEASE_AND_CD
. ' && npm ci --no-audit --no-fund',
);
run(
$node
. ' && cd {{release_path}}'
. RELEASE_AND_CD
. ' && for lock in Modules/*/package-lock.json; do'
. ' [ -f "$lock" ] || continue;'
. ' module_dir="$(dirname "$lock")";'
@@ -67,7 +68,7 @@ task('build', function (): void {
run(
$node
. ' && cd {{release_path}}'
. RELEASE_AND_CD
. ' && npm run build',
);
});