release: v0.17.0
GitHub Pages / build (push) Canceled after 0s
GitHub Pages / deploy (push) Canceled after 0s
Docker image / meta (push) Successful in 24s
Docs Docker image / meta (push) Successful in 7s
Docker image / build (amd64, linux/amd64, ubuntu-latest) (push) Failing after 59s
Docs Docker image / build (amd64, linux/amd64, ubuntu-latest) (push) Failing after 30s
Docker image / merge (push) Canceled after 0s
Docs Docker image / merge (push) Canceled after 0s
Docker image / build (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Docs Docker image / build (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s

This commit is contained in:
Qiufeng
2026-08-19 22:09:49 +08:00
parent 9414048f9d
commit 84e9e7bff5
469 changed files with 19997 additions and 39561 deletions
+20
View File
@@ -0,0 +1,20 @@
import { cp, rm } from "node:fs/promises";
import { spawnSync } from "node:child_process";
import { fileURLToPath } from "node:url";
import path from "node:path";
const scriptsDir = path.dirname(fileURLToPath(import.meta.url));
const projectRoot = path.resolve(scriptsDir, "..");
const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
function run(command, args, cwd) {
const result = spawnSync(command, args, { cwd, stdio: "inherit" });
if (result.status !== 0) process.exit(result.status ?? 1);
}
run(npmCommand, ["run", "build"], path.join(projectRoot, "web"));
run(npmCommand, ["run", "build"], path.join(projectRoot, "admin"));
const adminTarget = path.join(projectRoot, "web", "dist", "admin");
await rm(adminTarget, { recursive: true, force: true });
await cp(path.join(projectRoot, "admin", "dist"), adminTarget, { recursive: true });
+34
View File
@@ -0,0 +1,34 @@
import { spawn } from "node:child_process";
import { fileURLToPath } from "node:url";
import path from "node:path";
const scriptsDir = path.dirname(fileURLToPath(import.meta.url));
const projectRoot = path.resolve(scriptsDir, "..");
const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
const processes = [
spawn(npmCommand, ["run", "dev"], { cwd: path.join(projectRoot, "web"), stdio: "inherit" }),
spawn(npmCommand, ["run", "dev:linux", "--", "--force"], { cwd: path.join(projectRoot, "admin"), stdio: "inherit" }),
];
let stopping = false;
function stopAll(exitCode = 0) {
if (stopping) return;
stopping = true;
for (const child of processes) {
if (!child.killed) child.kill("SIGTERM");
}
setTimeout(() => process.exit(exitCode), 100);
}
for (const child of processes) {
child.on("exit", (code, signal) => {
if (stopping) return;
const exitCode = typeof code === "number" && code !== 0 ? code : signal ? 1 : 0;
stopAll(exitCode);
});
}
process.on("SIGINT", () => stopAll(0));
process.on("SIGTERM", () => stopAll(0));