← back to Coming Soon Template
snapshot: backup uncommitted work (1 files)
298fd1e3b38418a234264a3a28628acf4fc02740 · 2026-05-13 12:14:25 -0700 · SteveStudio2
Files touched
Diff
commit 298fd1e3b38418a234264a3a28628acf4fc02740
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 13 12:14:25 2026 -0700
snapshot: backup uncommitted work (1 files)
---
scripts/build.js | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/scripts/build.js b/scripts/build.js
index 599b3da..35837bd 100644
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -76,14 +76,26 @@ console.log(`\n✓ ${built} page${built === 1 ? '' : 's'} built into ${OUT}/`);
if (deploy) {
const REMOTE = 'root@45.61.58.125';
console.log(`\n→ rsync to ${REMOTE} (/var/www/<domain>/)…`);
+ // Pre-create remote dirs in one ssh call (BSD rsync on macOS lacks --mkpath).
+ const dirs = targets.map(t => '/var/www/' + t.domain).join(' ');
+ try {
+ execSync(`ssh -o StrictHostKeyChecking=no ${REMOTE} 'mkdir -p ${dirs}'`, { stdio: 'inherit' });
+ } catch (e) {
+ console.error(' ✗ remote mkdir failed:', e.message);
+ process.exit(1);
+ }
+ let ok = 0, fail = 0;
for (const entry of targets) {
const src = path.join(OUT, entry.domain, 'index.html');
const dest = REMOTE + ':/var/www/' + entry.domain + '/index.html';
try {
- execSync(`rsync -az --mkpath "${src}" "${dest}"`, { stdio: 'inherit' });
+ execSync(`rsync -az "${src}" "${dest}"`, { stdio: 'pipe' });
+ process.stdout.write(` deploy ${entry.domain}\n`);
+ ok++;
} catch (e) {
- console.error(` ✗ ${entry.domain} — ${e.message}`);
+ console.error(` ✗ ${entry.domain} — ${String(e.stderr || e.message).slice(0, 200)}`);
+ fail++;
}
}
- console.log('✓ deploy complete (vhosts must point at these paths)');
+ console.log(`\n✓ deploy: ${ok} ok, ${fail} failed (vhosts must point at /var/www/<domain>/index.html)`);
}
← d3214b0 coming-soon template: Gucci-aesthetic Editorial landing + ma
·
back to Coming Soon Template
·
Add Cloudflare Pages deploy script — artifact-dir only, neve 67ff39c →