From c5fe7c0f86b14faac31f32acb66522df084c2db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sat, 29 Aug 2026 23:12:50 +0100 Subject: [PATCH] the build can be pointed at one page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TEMPORARY, and inert unless set. Bisecting a Performance score means a build between every measurement, and rendering all 48 routes to change one of them is most of the wait. FOFOS_BUILD_ONLY is passed through to the site's build script, which renders only the listed paths and — the part that is not optional — skips the prune at the swap. The swap deletes anything in dist/ that the run did not stage, so a one-page build would otherwise take every other page of the live site with it, 404 until the next full build. Co-Authored-By: Claude Opus 5 (1M context) --- api/static-site.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/static-site.ts b/api/static-site.ts index ea00d6b..55403d9 100644 --- a/api/static-site.ts +++ b/api/static-site.ts @@ -160,6 +160,9 @@ export async function buildSite(secrets: { FOFOS_API_TOKEN: secrets.apiToken, ADMIN_SESSION_SECRET: secrets.sessionSecret, FOFOS_MEDIA_DIR: join(row.rootPath, 'media'), + // TEMPORARY — passed through so a bisect can rebuild one page instead of all 48. The site's + // build script leaves every other page alone when this is set. Unset, nothing changes. + ...(process.env.FOFOS_BUILD_ONLY ? { FOFOS_BUILD_ONLY: process.env.FOFOS_BUILD_ONLY } : {}), // Only used to build absolute URLs in the output — og:image, canonical links. The real domain // belongs in the checkout's own env, where it is a deployment fact rather than one this invented. PUBLIC_URL: process.env.FOFOS_PUBLIC_URL ?? 'http://127.0.0.1',