Repository navigation
174 lines (163 loc) · 8.27 KB
/
Copy pathdeploy-pages.yml
File metadata and controls
174 lines (163 loc) · 8.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: deploy-pages
on:
push:
branches: [main]
# Build on every pull request too, so a change to the layout, the content or
# the Hugo version has to prove the site still builds before it lands.
# Without this the workflow ran only on main, which meant a dependency bump
# arrived with no signal at all -- its checks read "no checks", which is not
# the same thing as green and must not be merged as if it were.
pull_request:
workflow_dispatch:
# The build needs nothing beyond the source and the Pages configuration it
# reads to compute the base URL. Publishing rights are granted to the deploy
# job alone, below, so a pull request build cannot replace what is served.
permissions:
contents: read
pages: read
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
# Hugo resolves the landingkit module (hugo.toml [module]) with the go
# command, at the version go.mod pins.
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
cache: false
- name: Set up Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "0.170.1"
extended: true
- name: Configure Pages
id: pages
uses: actions/configure-pages@v6
# This page states rbgo's ruby/spec total in the present tense in four
# places, and on 2026-10-12 all of them said 22,488 while the gate's own
# file summed to 23,511 — and two of them described the gate as a
# "shrink-only floor of 22,475", a mechanism replaced by a per-file
# baseline in ruby#739. A number and a mechanism, both stale, on the first
# page anybody reads.
#
# The check sums the gate's own per-file baseline and compares it against
# every present-tense claim here. It is the same binary the docs site
# runs, consumed across repositories rather than copied: two readers of
# one file cannot drift, where two transcriptions of one number already
# had. A dated block ("measured <date>") is exempt, because a dated
# measurement going stale is not an error.
#
# It runs BEFORE hugo so a wrong figure fails the build instead of being
# published, and on pull requests as well as on main. An unreachable
# baseline exits 2 and fails the step: an unreadable baseline finds no
# disagreement either, and that silence would read as agreement.
#
# PINNED TO A TAG, not @main, and that is not tidiness. `@main` is not
# "the current main": it is whatever the module proxy last cached for the
# branch, and the lag is measurable --
#
# $ go list -m github.com/go-embedded-ruby/docs@main
# …v0.0.0-20261012071659-5a27ddae9f8d # 07:16:59
# $ gh api …/commits/main --jq .sha
# 3384011416dc… # 07:25:48
#
# The first version of this step used @main and failed on a branch whose
# figures were right, because the tool it ran was nine minutes old and
# could not yet see this page's phrasing. A tag resolves deterministically.
#
# ⛔ THE FLAG IS `--root` SINCE docs v0.4.0, where the tool moved to cobra.
# `-root` is not a shorter spelling of it: pflag reads it as the cluster
# -r -o -o -t and the step fails with "unknown shorthand flag: 'r' in
# -root". The two are bumped TOGETHER for that reason -- a later bump that
# changed only the version would have met this during an upgrade that had
# nothing to do with it.
#
# Verified before bumping: the tool at that version reads THIS page's
# phrasing, 4 current claims against the gate's 23511. The vocabulary
# control still runs inside the tool on every invocation rather than only
# under `go test`, precisely because this consumer never runs that
# module's tests.
#
# ⛔ `--root .`, NOT `--root layouts`, since v0.5.0. This site states the
# total in THREE places, and `layouts/` holds two of them. The third is
# hugo.toml's `params.phases[].blurb` -- prose Hugo renders into the page
# like any other -- and it read 23,481 for 26 days under a green check,
# because neither the tool's `.md`/`.html` filter nor this root could
# reach it. v0.5.0 reads .toml; widening the root is what puts the third
# copy in the denominator. It checks 5 claims now, not 4.
#
# ⛔ v0.6.0 ALSO CHECKS THE VERSION THE TOTAL WAS COUNTED AT, which is why
# this page now states it. `23,511 examples pass` is a count over a
# POPULATION, and the population is selected by the Ruby version the
# conformance shim resolves `ruby_version_is` guards at: at 3.4.1 every
# example behind a `ruby_version_is "4.0"` guard is removed from the suite
# before anything runs -- 61 block guards and 5 inline sites at that
# boundary -- so the figure describes 3.4-shaped behaviour while this page
# also says the project targets 4.0 semantics and names a 4.0.5 oracle.
# All true, and together they read as a 4.0 result.
#
# The version is read from BOTH files in the interpreter repository that
# spell it (`rubyVersion` and the shim's `CUR_VERSION`) and a disagreement
# between them is a refusal, not a verdict on this page. The DIFFERENTIAL
# ORACLE named here is a different claim, free to be newer, and is
# deliberately not matched.
#
# Verified with the exact published command this lane runs, fetched
# through the proxy:
#
# $ go run github.com/go-embedded-ruby/docs/tools/conformancefigure@v0.8.0 --root .
# 6 total claim(s), 1 version claim(s) and 3 stubbed-helper mention(s) checked
# against the gate's 23672 at Ruby 4.0.9 (derived from RUBY_VERSION);
# the shim stubs output_to_fd, ruby_cmd, ruby_exe
#
# Two numbers in that line moved for reasons worth keeping apart. "1
# version claim … derived from RUBY_VERSION" is what the earlier comment
# here predicted: go-embedded-ruby/ruby#845 collapsed the two copies of
# the version into one, and nothing on this page had to change.
#
# SIX total claims, where v0.6.0 counted five, is a defect that version
# could not report. Its vocabulary spelled out "the sum is", "its sum is"
# and "whose sum is", so "The sum of those rows is <b>23,673</b>" in
# layouts/_default/list.html was never a candidate: the lane printed "5
# checked" and passed while that line held a stale figure. v0.7.0 reads
# it. Keep this pin moving forward -- a gate pinned to a version that
# cannot see a line is indistinguishable from a page with nothing wrong.
#
# v0.8.0 adds a THIRD fact read out of the interpreter repository: which
# mspec helpers the shim stubs, derived from every `def … raise SpecSkip`
# in spec_helper.rb. This page said "our shim stubs the matcher they need"
# and named none of them, while conformance.md named two that are
# implemented and missed `ruby_cmd` entirely. The list is now stated here
# and checked in both directions -- a helper called stubbed that is not,
# and a stubbed helper this page names nowhere.
- name: The stated conformance total, the version it was counted at, and the stubbed helpers match rbgo's gate
run: go run github.com/go-embedded-ruby/docs/tools/conformancefigure@v0.8.0 --root .
- name: Build landing page
run: hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: public
deploy:
# Only main publishes. A pull request stops after build above: it has built
# the site, which is the whole point of the gate, and it has no business
# replacing what is served.
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5