Let a tag publish to GitHub Pages again - #259
Conversation
`CompletePipeline.yml` guards `PublishToGitHubPages` on the ref, because the `github-pages` environment rejects a deployment from a feature branch before a runner is assigned - one second, no steps, no log - so every feature-branch pipeline showed a red job unrelated to its changes. The guard was written as an allowlist of the two refs that had been observed to deploy: the default branch and `dev`. On a tag push `github.ref_name` is the tag, so the job is **skipped** - silently, on the release run, which is the run whose documentation matters most. Tags are admitted by the environment. pyVHDLModel's v0.39.0 pipeline, still on `@r7`, deployed Pages from `ref_name = v0.39.0` (https://github.com/VHDL/pyVHDLModel/actions/runs/30951229155, job `PublishToGitHubPages` success). `github.ref_type == 'tag'` is added to the condition. Feature branches are still blocked, which is what the guard was for. `documentation_steps` defaults to `'html pages'`, so all eleven repositories calling `CompletePipeline.yml` publish Pages and all eleven would have lost their release-run documentation on moving to `@r8`. None has moved yet. `doc/Development.rst` gains the rule this came from: a condition gating a job on the ref is a blocklist of the refs that cannot work, never an allowlist of the refs that have been seen to work - an allowlist built from one observed rejection drops every ref that was never tried, and drops it by skipping, which no pipeline reports. Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Coverage variation | ✅ +0.00% coverage variation |
| Diff coverage | ✅ ∅ diff coverage |
Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (8e631fc) 45 41 91.11% Head commit (569f3ae) 45 (+0) 41 (+0) 91.11% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>
Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#259) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #259 +/- ##
=======================================
Coverage 82.22% 82.22%
=======================================
Files 1 1
Lines 45 45
Branches 9 9
=======================================
Hits 37 37
Misses 4 4
Partials 4 4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Bug Fixes
CompletePipeline.ymlstopped publishing GitHub Pages on tag runs. CompletePipeline: publish Pages only from branches the environment admits #249 guardedPublishToGitHubPageson the ref, because thegithub-pagesenvironment rejects a deployment from a featurebranch before a runner is assigned — one second, no steps, no log — so every feature-branch pipeline showed a
red job unrelated to its own changes. That part was right.
The guard was written as an allowlist of the two refs that had been observed to deploy:
&& (github.ref_name == github.event.repository.default_branch || github.ref_name == 'dev')On a tag push
github.ref_nameis the tag, so the job is skipped — not failed, skipped, which is whynothing reports it. And a tag run is exactly the run whose documentation matters most.
Tags are admitted by the environment. pyVHDLModel's v0.39.0 pipeline, still on
@r7, deployed Pages fromref_name = v0.39.0— run 30951229155, jobPublishToGitHubPages / 📖 Merge multiple contents for publishing → success.
The fix adds one term:
Feature branches stay blocked, which is what the guard was for.
Documentation
CompletePipeline.rststates, wheredocumentation_stepsis described, thatpagesadditionally depends onthe ref being one the environment admits — a tag, the default branch, or
dev— and why the job is skippedrather than failing on any other branch.
doc/Development.rst, Conditional Jobs → Guidelines, gains the rule this came from: a condition gating ajob on the ref is a blocklist of the refs that cannot work, never an allowlist of the refs that have been seen
to work. Observing one rejection says nothing about which other refs are admitted, so an allowlist built from
that observation silently drops every ref that was simply never tried — and drops it by skipping, which no
pipeline reports. CompletePipeline: publish Pages only from branches the environment admits #249 is written up there as the worked example.
Known Issues
Whether every consumer's
github-pagesenvironment admits tags is not knowable from here. pyVHDLModel'sdoes. A repository configured with Selected branches only would see the pre-CompletePipeline: publish Pages only from branches the environment admits #249 failure again on tag runs —
which was the status quo before CompletePipeline: publish Pages only from branches the environment admits #249, and is at least loud rather than silent. If that is not acceptable, the
guard has to become an input (
pages_refsor similar) rather than a fixed expression, because the answer isper-repository configuration that a job template cannot see. This pull-request takes the simpler option.
The verification pipelines cannot catch this class of defect. Neither
_Checking_SimplePackage_Pipeline.ymlnor
_Checking_NamespacePackage_Pipeline.ymlpassespagesindocumentation_steps, because deploying wouldoverwrite this repository's own site. So the original guard shipped, was reviewed and was written up in release
notes with no automated check able to contradict it. That is the second concrete cost of the missing
dry_runon
PublishToGitHubPages.yml.Others
Nothing is broken today. CompletePipeline: publish Pages only from branches the environment admits #249 exists only on
dev,mainandr8, and all eleven repositories callingCompletePipeline.ymlare still on@r7. The defect fires on the first migration — and sincedocumentation_stepsdefaults to'html pages', it fires for all eleven.This wants a v8.0.1 patch release. Unlike the major, a patch moves
r8, so consumers pick it up withoutediting anything.
Related Issues and Pull-Requests