Skip to content

Commit ac36d2b

Browse files
authored
Allow release tags to deploy the site (#53)
Every release-triggered **Publish site** run has failed since the manifests were added — 0.9.3-dev.3238, 0.9.3-dev.3241, 0.9.3, 0.9.4-dev.3243, and 0.9.4 — each in two to four seconds: ``` Tag "v0.9.4" is not allowed to deploy to github-pages due to environment protection rules. ``` A release event runs on the tag, and the `github-pages` environment allowed only `main`. ## Why it went unnoticed Pushes to `main` kept deploying normally, so the workflow looked healthy. What silently stopped was the part that only a release triggers: regenerating `stable.json` and `dev.json`. The manifest served from `whiteboard.sqlbi.com` stayed on 0.9.2 while 0.9.3 and 0.9.4 shipped. That is not cosmetic. The download page reads `stable.json` first and only falls back to the API on a 404, and the in-app update check reads the same file — so every 0.9.2 user was being told they were current, two releases late. ## The fix The environment now carries a tag rule for `v*` alongside the branch rule for `main`, applied to the repository settings. A manual deploy has already been run, so the live manifest reports 0.9.4. This change records the requirement, because it is invisible from the repository — the same class of dependency as the Pages source setting it now sits beside, and worth writing down in both places a reader might look.
1 parent 2d32c94 commit ac36d2b

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/publish-site.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
# Requires Settings -> Pages -> Build and deployment -> Source: GitHub Actions. With the
44
# default "Deploy from a branch" this workflow runs and deploys nothing.
55
#
6+
# It also requires a deployment policy on the github-pages environment that allows the
7+
# release tags, under Settings -> Environments -> github-pages -> Deployment branches and
8+
# tags: a branch rule for main, and a tag rule for v*. A release event runs on the tag
9+
# rather than on a branch, so without the tag rule every release-triggered run is rejected
10+
# in a couple of seconds with "Tag ... is not allowed to deploy to github-pages due to
11+
# environment protection rules" - and the manifests silently stop tracking releases while
12+
# ordinary pushes to main keep deploying fine.
13+
#
614
# site/CNAME carries the custom domain, so it survives every deployment rather than
715
# depending on the setting alone.
816
#

docs/release-management.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,19 @@ tied to the `sqlbi` publisher, then add it under the GitHub repo **Settings →
129129
variables → Actions**. Forks never receive it.
130130

131131
**Publish site** (`.github/workflows/publish-site.yml`) deploys `site/` to GitHub Pages
132-
when that tree changes on `main`, and on **Run workflow**. It needs **Settings → Pages →
133-
Source: GitHub Actions**. `site/CNAME` carries the custom domain.
132+
when that tree changes on `main`, when a release is published, and on **Run workflow**.
133+
`site/CNAME` carries the custom domain.
134+
135+
Two settings outside the repository have to be right, and each fails in its own quiet way:
136+
137+
- **Settings → Pages → Source: GitHub Actions.** With the default "Deploy from a branch"
138+
the workflow runs and deploys nothing.
139+
- **Settings → Environments → `github-pages` → Deployment branches and tags** must allow a
140+
branch rule for `main` *and* a tag rule for `v*`. A release event runs on the tag, so
141+
without the tag rule every release-triggered run is rejected within seconds while pushes
142+
to `main` keep working — which means the manifests quietly stop tracking releases and the
143+
download page keeps offering an old version. That is precisely what happened between
144+
0.9.3 and 0.9.4.
134145

135146
### Azure Pipelines
136147

0 commit comments

Comments
 (0)