mirror of
https://github.com/veeso/termscp.git
synced 2026-07-14 12:03:52 +02:00
ci(site): add format/lint/test/build workflow for astro site
Add Site GitHub Actions workflow running prettier format check, astro check, tests, and build on changes under site/. Wire prettier into the site package with config, ignore, and scripts, and format existing sources.
This commit is contained in:
@@ -1,22 +1,24 @@
|
||||
import { copyFile, access } from 'node:fs/promises';
|
||||
import { dirname, join } from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { copyFile, access } from "node:fs/promises";
|
||||
import { dirname, join } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const here = dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
// repo-root install scripts (single source of truth)
|
||||
const scripts = ['install.sh', 'install.ps1'];
|
||||
const scripts = ["install.sh", "install.ps1"];
|
||||
|
||||
await Promise.all(
|
||||
scripts.map(async (name) => {
|
||||
const src = join(here, '..', '..', name);
|
||||
const dest = join(here, '..', 'public', name);
|
||||
const src = join(here, "..", "..", name);
|
||||
const dest = join(here, "..", "public", name);
|
||||
|
||||
try {
|
||||
await access(src);
|
||||
} catch {
|
||||
console.error(`[copy-install] source not found: ${src}`);
|
||||
console.error(`[copy-install] the repo-root ${name} must be available at build time.`);
|
||||
console.error(
|
||||
`[copy-install] the repo-root ${name} must be available at build time.`,
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user