Skip to content

Skip prerendering for PR previews - #98

Merged
joan-code6 merged 2 commits into
mainfrom
fix/pr-prerender-production-only
Oct 17, 2026
Merged

joan-code6 merged 2 commits into
mainfrom
fix/pr-prerender-production-only

Conversation

@joan-code6

Copy link
Copy Markdown
Owner

PR previews currently invoke the production prerenderer through npm’s postbuild hook, fetching school data and generating every public school page. Set SKIP_PRERENDER=1 for preview builds and skip the school-page cache. Pushes and scheduled runs on main retain prerendering and the existing production cache.

Validation: all 6 deployment tests pass; workflow YAML parses; checked the rendering/cache condition for PRs, main pushes, scheduled main runs, and other branches. Build not run per AGENT.md.

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a4d46d9c-1eeb-4cc1-a529-83faee5c7e5e
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T18:57:49.911805Z ecb2c42 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: c420bc9322

ℹ️ 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".

run: npm run build
env:
NODE_ENV: production
SKIP_PRERENDER: ${{ github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'schedule') && '0' || '1' }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep the required status page in preview artifacts

On every pull_request run this sets SKIP_PRERENDER=1, so scripts/prerender.mjs returns before creating dist/status/index.html. The subsequent workflow_run deployment still executes scripts/cloudflare/deploy.cjs, which unconditionally requires status/index.html before invoking Wrangler, causing every PR preview deployment produced by this workflow to fail with Missing status/index.html rather than publishing the intended client-rendered preview.

Useful? React with 👍 / 👎.

@joan-code6
joan-code6 merged commit 3972067 into main Oct 17, 2026
3 checks passed
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