Conversation
The admin build no longer needs GHOST_CDN_URL baked in at build time. Deploy-time index.html rewriting (in Ghost-Moya) handles CDN URL injection per environment instead. A validation step confirms the build output uses relative paths and includes the ghost-cdn-url meta tag needed by the deploy-time rewrite.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #26556 +/- ##
==========================================
- Coverage 73.14% 73.13% -0.01%
==========================================
Files 1528 1528
Lines 120154 120156 +2
Branches 14506 14504 -2
==========================================
- Hits 87886 87879 -7
- Misses 31247 31272 +25
+ Partials 1021 1005 -16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Closing — no longer needed. PR #26546 introduces a separate |
Context
This is PR 3 of 3 in the deploy-time admin rewrite initiative.
Proposal: Build once, deploy everywhere — deploy-time index.html rewrite
Summary
Ghost(Pro) currently bakes
GHOST_CDN_URL=https://assets.ghost.io/admin-forward/into the admin build at CI time, producing absolute CDN URLs in the artifact. This means Ghost-Moya must string-replace production URLs with staging URLs at deploy time — a fragile process that couples the build to the deployment target.The new approach builds admin with relative paths (
./assets/...) and aghost-cdn-urlmeta tag. At deploy time, a simplesedcommand in Ghost-Moya rewritesindex.htmlper environment — no Node.js script, no string replacement across JS bundles.What this PR does
GHOST_CDN_URLenvironment variable from thedeploy_adminCI job./assets/)ghost-cdn-urlmeta tag (added by PR 1)Dependencies
Impact
sedrewriting.GHOST_CDN_URLremains a supported build-time option invite.config.ts— only the CI environment variable is removed.Test plan
apps/admin/dist/index.htmlwith relative pathsghost-cdn-urlmeta present)GHOST_CDN_URLstill work as before