Add staging deploy workflow + parameterize storage zone - #11
Merged
Conversation
Introduce a manual staging deploy path so site builds can be pushed to a separate storage zone for testing, without touching production. - deploy-bunny.mjs: add BUNNY_STORAGE_ZONE env var (defaults to shroud-email-website, so production is unchanged). Set it to shroud-email-website-staging for staging deploys. - deploy-staging.yml: manual-dispatch workflow that builds the site and uploads to the shroud-email-website-staging storage zone, then purges the staging pull zone cache. No behavior change to the production deploy.yml. Required staging secrets: BUNNY_STAGING_STORAGE_PASSWORD, BUNNY_STAGING_PULLZONE_ID, BUNNY_API_KEY.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
shroud-email-website | b3fb847 | Jul 24 2026, 02:26 PM |
taobojlen
added a commit
that referenced
this pull request
Jul 24, 2026
Display 25 pounds/year to UK visitors and $35/year to everyone else by rewriting the price at the edge based on the bunny CDN-RequestCountryCode header. Website changes: - Pricing.vue: wrap price strings in <span data-price=""> markers; the edge script targets these for rewriting. - pricing.astro: drop client:load on the Pricing component. It is purely presentational, so static rendering avoids a hydration snap-back that would overwrite the edge-rewritten price. Also ships no JS for the page. - tsconfig.json: exclude edge-script/ from astro check (it has its own Deno type-check; the bundled output was producing spurious TS errors). Edge script (edge-script/): - Middleware script using servePullZone + HTMLRewriter. Non-UK visitors get $35/year; UK/unknown visitors see the 25 pounds/year default baked into the HTML (safe degradation if the script is disabled). - Bundled to a single file via esbuild + @luca/esbuild-deno-loader (mirrors the official BunnyWay template). Deploy: - deploy-edge-script.yml: type-check + bundle + upload the edge script to a staging edge script id (BUNNY_STAGING_SCRIPT_ID / BUNNY_STAGING_DEPLOY_KEY). Staging deploy infra (storage zone parameterization + deploy-staging workflow) arrives via #11, already merged to main.
taobojlen
added a commit
that referenced
this pull request
Jul 24, 2026
Display 25 pounds/year to UK visitors and $35/year to everyone else by rewriting the price at the edge based on the bunny CDN-RequestCountryCode header. Website changes: - Pricing.vue: wrap price strings in <span data-price=""> markers; the edge script targets these for rewriting. - pricing.astro: drop client:load on the Pricing component. It is purely presentational, so static rendering avoids a hydration snap-back that would overwrite the edge-rewritten price. Also ships no JS for the page. - tsconfig.json: exclude edge-script/ from astro check (it has its own Deno type-check; the bundled output was producing spurious TS errors). Edge script (edge-script/): - Middleware script using servePullZone + HTMLRewriter. Non-UK visitors get $35/year; UK/unknown visitors see the 25 pounds/year default baked into the HTML (safe degradation if the script is disabled). - Bundled to a single file via esbuild + @luca/esbuild-deno-loader (mirrors the official BunnyWay template). Deploy: - deploy-edge-script.yml: type-check + bundle + upload the edge script to a staging edge script id (BUNNY_STAGING_SCRIPT_ID / BUNNY_STAGING_DEPLOY_KEY). Staging deploy infra (storage zone parameterization + deploy-staging workflow) arrives via #11, already merged to main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Split out from #10 so the staging deploy action can be merged and used independently of the geo-pricing feature. Merge this first.
scripts/deploy-bunny.mjs— addBUNNY_STORAGE_ZONEenv var (defaults toshroud-email-website, so production is unchanged). Set it toshroud-email-website-stagingfor staging deploys..github/workflows/deploy-staging.yml— manual-dispatch workflow that builds the site and uploads to theshroud-email-website-stagingstorage zone, then purges the staging pull zone cache.No behavior change to the production
deploy.yml— it doesn't setBUNNY_STORAGE_ZONE, so it keeps using the default.Why split
Manual workflows (
workflow_dispatch) only run frommain, so the staging deploy action needs to be onmainbefore it can be used to test #10.Required staging secrets
Repo → Settings → Secrets → Actions:
BUNNY_STAGING_STORAGE_PASSWORDBUNNY_STAGING_PULLZONE_IDBUNNY_API_KEYVerified
node --check scripts/deploy-bunny.mjs✅deploy.ymlunaffected (noBUNNY_STORAGE_ZONE→ uses default)