feat: 调整部署脚本

This commit is contained in:
2026-07-28 17:05:22 +08:00
parent 1edf3d560c
commit fe45e31165
14 changed files with 255 additions and 118 deletions
+3 -3
View File
@@ -10,7 +10,7 @@ import {
composeDown,
} from '../docker.js';
import { assertArtifactsExist, ensureArtifactsDirs } from '../artifacts.js';
import { getArtifactDir, loadConfig, getServiceConfig, syncServerKeyAuth } from '../config.js';
import { getArtifactDir, loadConfig, getServiceConfig, syncServerKeyAuth, isStaticDeploy } from '../config.js';
import { printError, printInfo, printSuccess } from '../ui/render.js';
import type { Environment, Service, ServiceEnvConfig } from '../types.js';
@@ -114,7 +114,7 @@ export async function deployArtifactsOnly(
);
try {
if (cfg.extractDir) {
if (isStaticDeploy(cfg)) {
await deployService(conn, service, cfg, getArtifactDir(service), env);
} else {
await deployService(conn, service, cfg, getArtifactDir(service), env);
@@ -146,7 +146,7 @@ export async function buildAndDeployServices(
);
try {
if (cfg.extractDir) {
if (isStaticDeploy(cfg)) {
await deployService(conn, service, cfg, getArtifactDir(service), env);
} else {
await deployService(conn, service, cfg, getArtifactDir(service), env);