Skip to content

Commit ee7e06b

Browse files
fix(website): deploy main, not the tag ref (#837)
* fix(website): deploy main, not the tag ref Two fixes to the release-triggered deploy observed in run 38835604913: 1. The website environment's custom branch policy does not admit tag refs, and the release event's ref IS a tag — the deploy can never pass environment protection. Checkout refs/heads/main instead: the release commit is main's tip by construction (changesets opens the release PR from main), so the deployed build is the released content. 2. Restore job-level concurrency (lost when the workflow landed on main without it): a relay release must fail the job's tag filter before it enters the deploy queue, not after, or it can replace a queued website deploy. * chore(website): add the changeset for the deploy fix * fix(website): check out the release tag, not main The environment's branch policy admits nostream-website@* (every release deploy since 1.1.1 has run on the tag ref), so the refs/heads/main pin was never needed for admission — and it was wrong for correctness: main can advance between the release publish and the job starting, and the pin would build and deploy unreleased content. Keep the default tag checkout so the deployed build is exactly the released commit. Also restore the router-worker deploy line the branch predates. * docs(website): correct the changeset's checkout description The changeset still claimed releases deploy main because the environment rejects tag refs; the fix actually keeps the triggering tag (which the policy admits) and the real change is the job-scoped deploy queue. Rewritten before it becomes release notes. --------- Co-authored-by: Abhay <pandeyabhay967@gmail.com>
1 parent 4d7d0d0 commit ee7e06b

2 files changed

Lines changed: 18 additions & 4 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"nostream-website": patch
3+
---
4+
5+
Website deploy workflow fix: the deploy queue is job-scoped so relay releases can't displace a pending website deploy (measured: the nostream@3.5.1 release run was cancelled with zero jobs at the workflow-level concurrency group, before its job-level `if` could skip it). The checkout stays on the triggering `nostream-website@` tag, which the `website` environment's branch policy admits — the deployed build is exactly the released commit.

‎.github/workflows/deploy-website.yml‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ on:
1212
- published
1313
workflow_dispatch:
1414

15-
concurrency:
16-
group: deploy-website
17-
cancel-in-progress: false
18-
1915
jobs:
2016
deploy:
17+
# Concurrency lives on the job, not the workflow: a relay release
18+
# (v* tag) fails the if below and must not enter this deploy queue,
19+
# where it could replace a queued website deploy. Measured: the
20+
# nostream@3.5.1 release run (38845857055) was cancelled with zero
21+
# jobs at the workflow-level group, before the job if could skip it.
22+
concurrency:
23+
group: deploy-website
24+
cancel-in-progress: false
2125
# workflow_dispatch ignores every on: filter — a manual run must not
2226
# publish a non-main branch to production, so dispatch stays main-only.
2327
if: >-
@@ -31,6 +35,11 @@ jobs:
3135
permissions:
3236
contents: read
3337
steps:
38+
# Checkout gets the release event's default: the tag that triggered the
39+
# run (refs/tags/nostream-website@X.Y.Z). The website environment's
40+
# branch policy admits nostream-website@* — every release deploy since
41+
# 1.1.1 has run on the tag ref — so the build is exactly the released
42+
# commit, even if main has advanced by the time the job starts.
3443
- name: Checkout
3544
uses: actions/checkout@v3
3645

0 commit comments

Comments
 (0)