Skip to content

feat(ci): per-PR preview deployments on gh-pages with boot check - #80

Merged
dbolser merged 1 commit into
mainfrom
ci/pr-previews
Jul 24, 2026
Merged

dbolser merged 1 commit into
mainfrom
ci/pr-previews

Conversation

@dbolser

@dbolser dbolser commented Jul 24, 2026

Copy link
Copy Markdown
Owner

What

PLAN.md queue item 1: per-PR preview staging infra, unblocking the visual review flow.

  • deploy.yml (rewritten): Pages deployment moves from the actions/deploy-pages artifact flow to a gh-pages branch flow. On push to main it builds with the prod base path and replaces the branch root, preserving previews/. Serialized under concurrency: group: "pages".
  • pr-preview.yml (new): on same-repo PR open/synchronize/reopen (guarded by head.repo.full_name == github.repository), builds with VITE_BASE_PATH=/Demonstrable-Plotalizer/previews/pr-<N>/ and publishes to previews/pr-<N>/ on gh-pages, keeping everything else. Posts/updates a sticky comment with the preview URL: https://dbolser.github.io/Demonstrable-Plotalizer/previews/pr-<N>/. Shares the "pages" concurrency group so prod and preview publishes never race.
  • pr-preview-cleanup.yml (new): on PR close, removes previews/pr-<N>/ from gh-pages.
  • vite.config.ts: now respects a VITE_BASE_PATH env override (falls back to the existing prod/dev behavior). ?data=/#view= links already work under a subpath — the app only uses import.meta.env.BASE_URL (sample CSV) and relative paths; no hardcoded absolute paths remain.
  • index.html: dropped the dead /vite.svg favicon link — the file doesn't exist and 404'd under any base path (including current prod).
  • checks/preview-boot.mjs + puppeteer-core devDependency; PLAN.md updated (item 1 shipped, working-agreement note on the Pages source setting).

Why

Dan reviews each PR visually on the site; each open PR needs its own deployed build (PLAN.md working agreement item 2).

Regression guarantee

Guarantee (b): checks/preview-boot.mjs — run node checks/preview-boot.mjs <url>. Uses puppeteer-core + system Chromium; asserts the page loads, >0 matrix canvases render (the app auto-loads the sample CSV), and no page/console errors. Verified locally against npm run preview (12 canvases, clean pass; non-zero exit on a bad URL).

Merge-time action required

The repo's Pages source setting must be flipped to "Deploy from a branch" → gh-pages / root when this merges (the artifact-based deploy path is removed by this PR). Until the first main push after merge creates gh-pages, the site keeps serving the last artifact deploy.

Gates

npm run typecheck clean, npm run test:run 361/361 green, npm run build OK.

🤖 Generated with Claude Code

https://claude.ai/code/session_0152hQSk9mV9zoZJBSRAJQWn

Switch Pages deployment from the actions/deploy-pages artifact flow to a
gh-pages branch flow so per-PR previews can live alongside prod:

- deploy.yml: on push to main, build and replace the gh-pages branch root
  while preserving previews/; serialized via concurrency group "pages".
- pr-preview.yml: on same-repo PR open/sync, build with
  VITE_BASE_PATH=/Demonstrable-Plotalizer/previews/pr-<N>/ and publish to
  previews/pr-<N>/ on gh-pages; maintains a sticky PR comment with the
  preview URL. Shares the "pages" concurrency group.
- pr-preview-cleanup.yml: on PR close, remove previews/pr-<N>/.
- vite.config.ts: respect VITE_BASE_PATH as a base-path override.
- checks/preview-boot.mjs: regression guarantee (b) - puppeteer-core +
  system Chromium boot check asserting the app renders the sample matrix
  with no page/console errors (puppeteer-core added as devDependency).
- index.html: drop dead /vite.svg favicon link (404'd under any base path).
- PLAN.md: mark queue item 1 shipped; note the Pages source must be
  flipped to "deploy from branch gh-pages" at merge time.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0152hQSk9mV9zoZJBSRAJQWn
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@dbolser, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4df10be9-50ac-4060-885a-424a613de8bb

📥 Commits

Reviewing files that changed from the base of the PR and between 8499c94 and 6cf6993.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (8)
  • .github/workflows/deploy.yml
  • .github/workflows/pr-preview-cleanup.yml
  • .github/workflows/pr-preview.yml
  • PLAN.md
  • checks/preview-boot.mjs
  • index.html
  • package.json
  • vite.config.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/pr-previews

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.

@github-actions

Copy link
Copy Markdown
Contributor

Preview deployment

Preview Commit
https://dbolser.github.io/Demonstrable-Plotalizer/previews/pr-80/ 6cf6993

Published to previews/pr-80/ on gh-pages; updated on every push, removed when the PR closes. Boot check: node checks/preview-boot.mjs https://dbolser.github.io/Demonstrable-Plotalizer/previews/pr-80/

@dbolser
dbolser merged commit b6723a8 into main Jul 24, 2026
4 checks passed
@dbolser
dbolser deleted the ci/pr-previews branch July 24, 2026 14:02
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