Skip to content

feat(ci): staging counterpart of rebuild-on-dispatch.yml#22

Merged
blackbrowed-labs merged 1 commit into
devfrom
feat/rebuild-on-dispatch-staging
May 13, 2026
Merged

feat(ci): staging counterpart of rebuild-on-dispatch.yml#22
blackbrowed-labs merged 1 commit into
devfrom
feat/rebuild-on-dispatch-staging

Conversation

@larsweiser
Copy link
Copy Markdown
Collaborator

@larsweiser larsweiser commented May 13, 2026

Summary

Adds a staging-side mirror of rebuild-on-dispatch.yml. A single product-release-published dispatch from a product repo now refreshes both production and staging in parallel.

Closes the gap surfaced by the bare-SemVer integration test on 2026-05-13: staging was not refreshed by product-release dispatches, so verifying a new release on a draft-only product (e.g. pipeline-test-fixture) required a manual workflow_dispatch on deploy-staging.yml.

Changes

  • .github/workflows/rebuild-on-dispatch-staging.yml (new, 58 lines)
    • Same trigger (repository_dispatchproduct-release-published)
    • Checks out dev instead of main
    • PUBLIC_ENVIRONMENT: staging, command: deploy --env staging
    • Otherwise identical to the production workflow (Node 24, wrangler-action@v3, same env vars)

Convention match

Mirrors the per-environment-file pattern already in place across two other pairs:

Production Staging
deploy-production.yml deploy-staging.yml
rebuild-nightly.yml rebuild-nightly-staging.yml
rebuild-on-dispatch.yml rebuild-on-dispatch-staging.yml (this PR)

Routing note

repository_dispatch workflows only fire from files on the repo's default branch (main). So this file becomes active only after the next dev → main rollout. The header comment in the new file captures this for future readers.

Test plan

After this PR merges to dev and the subsequent dev → main rollout lands, cut a 0.0.3 release on pipeline-test-fixture (UI). Expected: the dispatch fires both workflows on this repo in parallel, both complete green, and staging picks up 0.0.3 without any manual workflow_dispatch.

  • Branch CI green (no executable surface for this workflow on dev push — file only fires on dispatch from default branch)
  • Merge to dev
  • Prep dev → main rollout PR
  • Merge rollout to main
  • Cut 0.0.3 on pipeline-test-fixture via GitHub UI (CHANGELOG section + release)
  • Verify both workflow runs appear in this repo's Actions tab: rebuild-on-dispatch (production) AND rebuild-on-dispatch-staging (this PR), both green
  • Verify dev.blackbrowedlabs.com/produkte/pipeline-test-fixture/ version-chip shows 0.0.3 without a manual staging deploy
  • Verify production side unchanged (/produkte/pipeline-test-fixture/ remains 404 — draft: true on the .md file)

🤖 Generated with Claude Code

Adds `.github/workflows/rebuild-on-dispatch-staging.yml`, mirroring the
existing production dispatch workflow but checking out `dev`, building
with `PUBLIC_ENVIRONMENT=staging`, and deploying via
`wrangler deploy --env staging`. A single `product-release-published`
dispatch from a product repo now refreshes both environments in
parallel.

Matches the per-environment-file convention already in place for
`rebuild-nightly.yml` / `rebuild-nightly-staging.yml` and
`deploy-production.yml` / `deploy-staging.yml`.

Note on routing: `repository_dispatch` workflows only fire from files
on the repo's default branch (`main`). This file becomes active only
after the next dev → main rollout — captured as a comment in the file
header.

Motivation: the bare-SemVer integration test on 2026-05-13 surfaced
that staging was not refreshed by product-release dispatches, so a new
release on a draft-only product (e.g. pipeline-test-fixture) required a
manual `workflow_dispatch` on deploy-staging.yml to verify on staging.
This closes that gap.

Co-Authored-By: Claude <noreply@anthropic.com>
@blackbrowed-labs blackbrowed-labs merged commit 9b5d3cb into dev May 13, 2026
@blackbrowed-labs blackbrowed-labs deleted the feat/rebuild-on-dispatch-staging branch May 13, 2026 13:23
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.

2 participants