Use versioned Worker previews for branch content

This commit is contained in:
Kevin
2026-09-02 11:01:09 -04:00
parent dfc87b86ac
commit bdf0d06c1a
7 changed files with 59 additions and 17 deletions
+2 -2
View File
@@ -17,7 +17,7 @@ for (const { file, html } of pages) {
const home = await readFile(resolve(root, 'index.html'), 'utf8');
if (key === 'www') {
if (!home.includes('What services do you offer?') || !home.includes('How do I book a visit?')) throw new Error('Primary FAQ Markdown entries are missing from the homepage.');
for (const question of ['What services do you offer?', 'How do I book a visit?', 'How far ahead should I book pet care?', 'Can you accommodate special routines?']) if (!home.includes(question)) throw new Error(`Primary FAQ Markdown entry is missing: ${question}.`);
if (home.includes('What information should I bring to a meet and greet?')) throw new Error('Draft FAQ entry appeared in the homepage.');
const services = await readFile(resolve(root, 'services/index.html'), 'utf8');
for (const title of ['Dog walking', 'Grooming', 'Overnight care']) if (!services.includes(title)) throw new Error(`Service Markdown entry is missing: ${title}.`);
@@ -25,7 +25,7 @@ if (key === 'www') {
for (const name of ['Sarah Mitchell', 'Marcus Rivera', 'Emily Chen', 'David Okonkwo']) if (!about.includes(name)) throw new Error(`Team Markdown entry is missing: ${name}.`);
}
if (key === 'blog') {
const publishedPosts = ['first-walk-after-work', 'gentler-grooming-day', 'overnight-care-checklist'];
const publishedPosts = ['first-walk-after-work', 'gentler-grooming-day', 'overnight-care-checklist', 'weekend-care-prep'];
await Promise.all(publishedPosts.map((slug) => access(resolve(root, `posts/${slug}/index.html`))));
if (home.includes('Draft only example for editorial review')) throw new Error('Draft blog post appeared in the journal.');
try {