mirror of
https://github.com/supabase/supabase.git
synced 2026-12-05 07:59:03 +00:00
The scan reads its page list from master, so a guide merged since the last production deploy returned 404 and failed it. When DOCS_E2E_SITEMAP_URL is set, e2e:docs:all keeps only the guides that are also in that sitemap, and lists the rest as not on production yet. The run fails when the sitemap can't be read, lists no guides, or is missing more than a tenth of them.
26 lines
917 B
JavaScript
26 lines
917 B
JavaScript
#!/usr/bin/env node
|
|
import { dirname, join } from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
|
|
import { runSuite } from '../../shared/run-suite.ts'
|
|
import { onlyProductionPages } from '../utils/production-pages.ts'
|
|
import { resolveAllDocsPages, resolveDocsScope } from '../utils/resolve-docs-scope.ts'
|
|
|
|
runSuite({
|
|
root: join(dirname(fileURLToPath(import.meta.url)), '..'),
|
|
label: 'docs',
|
|
devCommand: 'pnpm dev:docs',
|
|
pagePathsEnv: 'DOCS_E2E_PAGE_PATHS',
|
|
baseRefEnv: 'DOCS_E2E_BASE_REF',
|
|
defaultBaseUrl: 'http://localhost:3001',
|
|
resolveScope: resolveDocsScope,
|
|
resolveAllPages: async (repoRoot) => {
|
|
const pages = await resolveAllDocsPages(repoRoot)
|
|
const sitemapUrl = process.env.DOCS_E2E_SITEMAP_URL
|
|
return sitemapUrl ? onlyProductionPages(pages, sitemapUrl) : pages
|
|
},
|
|
}).catch((error) => {
|
|
console.error(error instanceof Error ? error.message : error)
|
|
process.exit(1)
|
|
})
|