Skip to content

fix: tolerate missing sitemap in e2e builds - #730

Merged
brendanjryan merged 1 commit into
mainfrom
brendanjryan/fix-e2e-sitemap
Jul 21, 2026
Merged

brendanjryan merged 1 commit into
mainfrom
brendanjryan/fix-e2e-sitemap

Conversation

@brendanjryan

Copy link
Copy Markdown
Contributor

Motivation

E2E builds do not generate a sitemap, causing the post-build finalizer to fail.

Summary

  • Skip sitemap finalization when no sitemap is generated
  • Preserve failures for other filesystem errors

Key design considerations

  • Production sitemap finalization remains unchanged

@vercel

vercel Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tempo-docs Error Error Jul 21, 2026 12:15am

Request Review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cffc0efc39

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/finalize-sitemap.ts Outdated
try {
sitemap = await fs.readFile(sitemapPath, 'utf-8')
} catch (error) {
if ((error as NodeJS.ErrnoException).code === 'ENOENT') process.exit(0)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Scope missing-sitemap tolerance to E2E builds

In the production build path, the workflow runs pnpm run build with VERCEL_ENV=production, but this unconditional ENOENT exit also returns success if that build ever stops emitting dist/public/sitemap.xml. In that scenario finalizeSitemap never adds the generated blog post URLs and CI/deploy can ship without the sitemap advertised by public/robots.txt; please gate this skip on the E2E/non-production environment so production still fails loudly.

Useful? React with 👍 / 👎.

@brendanjryan
brendanjryan force-pushed the brendanjryan/fix-e2e-sitemap branch from cffc0ef to 12e7ebf Compare July 21, 2026 00:12
@brendanjryan
brendanjryan merged commit ffb2d24 into main Jul 21, 2026
10 of 11 checks passed
@brendanjryan
brendanjryan deleted the brendanjryan/fix-e2e-sitemap branch July 21, 2026 00:37

This branch had an error being deployed

1 failed deployment
Preview — 12e7ebf6 Deployed Jul 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant