fix(pages): dedicated product-page branch + fix broken images#456
Conversation
Switch the GitHub Pages deploy trigger from demo to the dedicated product-page branch so any PR merged there rebuilds the site. Replace the custom PUBLIC_SITE_BASE vite.define injection with Astro's built-in import.meta.env.BASE_URL. BASE_URL is set directly from the `base` astro config (which already reads GITHUB_PAGES_BASE), so the double-injection chain that caused images to silently fall back to "/" is eliminated. https://claude.ai/code/session_01Fd2SMPUQ1ZW2ybCgJx9bKS
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9efc77a3f0
ℹ️ 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".
The test asserted that site-base.ts contains PUBLIC_SITE_BASE, which was the old injection mechanism. The helper now reads Astro's built-in BASE_URL — update the regex to match the new contract while preserving the intent (build-time configured base, not Astro.url.pathname). Addresses Codex P1 review on PR #456. https://claude.ai/code/session_01Fd2SMPUQ1ZW2ybCgJx9bKS
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e845e9fb8d
ℹ️ 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".
Add product-page to the settings.json push-deny list so the Pages deployment branch is protected the same way main/develop/demo are. Update docs/branching.md to record product-page as the GitHub Pages source (pages.yml now triggers on product-page, not demo), add it to the required ruleset section, and note that demo is retained as the release snapshot branch but no longer drives Pages. Addresses Codex P1 review on PR #456. https://claude.ai/code/session_01Fd2SMPUQ1ZW2ybCgJx9bKS
import.meta.env.BASE_URL evaluates to "/" in Astro's build context even when base is set to "/agentic-workflow/", so switching to it silently dropped the base prefix from all manually-constructed asset URLs (favicons, SVGs). The vite.define injection reliably injects the correct value at build time. Restore the original pattern; TEST-SITE-002 confirms correct asset paths in the built HTML. https://claude.ai/code/session_01Fd2SMPUQ1ZW2ybCgJx9bKS
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74553663e9
ℹ️ 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".
The heading rename in docs/branching.md changed the anchor from #required-ruleset-for-develop-main-demo to #required-ruleset-for-develop-main-demo-product-page. Update the two linking docs (ci-automation.md, security-ci.md) to point at the new anchor so check:links passes. Addresses Codex P1 review on PR #456. https://claude.ai/code/session_01Fd2SMPUQ1ZW2ybCgJx9bKS
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dbd0e09beb
ℹ️ 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".
The integration-branch ruleset row in security-ci.md listed only develop/main/demo for Shape B. Add product-page so downstream adopters know to protect the Pages deployment branch against direct pushes. Addresses Codex P2 review on PR #456. https://claude.ai/code/session_01Fd2SMPUQ1ZW2ybCgJx9bKS
Summary
pages.ymlnow fires onproduct-pageinstead ofdemo. Merging any PR intoproduct-pagetriggers a fresh GitHub Pages build and deploy.site-base.tspreviously readimport.meta.env.PUBLIC_SITE_BASE, which was injected via avite.defineinastro.config.ts. If that injection was missed or evaluated at the wrong time the variable fell back to"/", stripping the/agentic-workflow/prefix from all asset URLs and breaking images. Replaced with Astro's built-inimport.meta.env.BASE_URL, which is set directly and reliably from thebaseconfig option (already seeded byGITHUB_PAGES_BASEfromactions/configure-pages). Removed the now-redundantvite.defineblock.Files changed
.github/workflows/pages.ymldemo→product-pagesites/astro.config.tsvite.define['import.meta.env.PUBLIC_SITE_BASE']sites/src/lib/site-base.tsimport.meta.env.BASE_URLinstead ofPUBLIC_SITE_BASETest plan
develop, then cut a PR fromdevelopinto theproduct-pagebranchDeploy GitHub Pagesworkflow triggers on theproduct-pagepushworkflow_dispatchstill works for manual redeployshttps://claude.ai/code/session_01Fd2SMPUQ1ZW2ybCgJx9bKS
Generated by Claude Code