Repository navigation
Skip prerendering for PR previews - #98
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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' }} |
There was a problem hiding this comment.
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 👍 / 👎.
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.