diff --git a/.github/workflows/docs-pages.yml b/.github/workflows/docs-pages.yml index 3c2badd8..59e74636 100644 --- a/.github/workflows/docs-pages.yml +++ b/.github/workflows/docs-pages.yml @@ -166,6 +166,9 @@ jobs: - name: Verify current machine-readable documentation working-directory: docs/site run: npm run check:llms:built + env: + DOCS_DIST_DIR: ${{ github.workspace }}/docs/site/dist/dev + DOCS_PUBLIC_BASE: /dev/ - name: Verify assembled documentation tree working-directory: docs/site diff --git a/docs/site/scripts/check-evidence-links.test.mjs b/docs/site/scripts/check-evidence-links.test.mjs index 50b49310..2d1b37ae 100644 --- a/docs/site/scripts/check-evidence-links.test.mjs +++ b/docs/site/scripts/check-evidence-links.test.mjs @@ -245,12 +245,20 @@ test('Pages authenticates an exact release before build and smokes one assembled const docsBuild = workflow.indexOf('Build protected main at /dev/'); const archiveAssembly = workflow.indexOf('npm run assemble:archives'); const rootStaging = workflow.indexOf('npm run stage:production-docsets'); + const llmsCheck = workflow.indexOf('Verify current machine-readable documentation'); + const assembledCheck = workflow.indexOf('Verify assembled documentation tree'); const localSmoke = workflow.indexOf('npm run smoke:deployment'); const upload = workflow.indexOf('actions/upload-pages-artifact'); const liveSmoke = workflow.lastIndexOf('smoke-docs-deployment.mjs'); assert.ok(dispatchValidation >= 0); assert.ok(dispatchValidation < docsBuild); assert.ok(rootStaging > archiveAssembly); + assert.ok(llmsCheck > rootStaging); + assert.match( + workflow.slice(llmsCheck, assembledCheck), + /DOCS_DIST_DIR: \$\{\{ github\.workspace \}\}\/docs\/site\/dist\/dev/, + ); + assert.match(workflow.slice(llmsCheck, assembledCheck), /DOCS_PUBLIC_BASE: \/dev\//); assert.ok(localSmoke > rootStaging); assert.ok(upload > localSmoke); assert.ok(liveSmoke > upload); diff --git a/docs/site/scripts/smoke-docs-deployment.mjs b/docs/site/scripts/smoke-docs-deployment.mjs index 0e7d7f27..45b83091 100644 --- a/docs/site/scripts/smoke-docs-deployment.mjs +++ b/docs/site/scripts/smoke-docs-deployment.mjs @@ -88,8 +88,8 @@ export async function smokeDocsDeployment({ if (canonicalFromHtml(devHtml) !== `${productionOrigin}/dev/`) { throw new Error('/dev/ is not canonical at the protected-main mount'); } - if (canonicalFromHtml(versionHtml) !== `${productionOrigin}/`) { - throw new Error(`${versionPath} is not an unchanged root-canonical release copy`); + if (canonicalFromHtml(versionHtml) !== `${productionOrigin}${versionPath}`) { + throw new Error(`${versionPath} is not canonical at the immutable version route`); } if (!rootHtml.includes(versionPath)) { throw new Error(`/ does not expose version navigation to ${versionPath}`); diff --git a/docs/site/scripts/smoke-docs-deployment.test.mjs b/docs/site/scripts/smoke-docs-deployment.test.mjs index 1d891610..5b38cb38 100644 --- a/docs/site/scripts/smoke-docs-deployment.test.mjs +++ b/docs/site/scripts/smoke-docs-deployment.test.mjs @@ -27,7 +27,7 @@ function fixture(overrides = {}) { ], ['/start/quickstart/', html(`${origin}/start/quickstart/`)], ['/dev/', html(`${origin}/dev/`)], - ['/v/1.2.3/', html(`${origin}/`)], + ['/v/1.2.3/', html(`${origin}/v/1.2.3/`)], ['/pagefind/pagefind.js', Buffer.from('search')], ['/pagefind/pagefind-entry.json', Buffer.from('{}')], ['/sitemap-index.xml', Buffer.from('')],