|
1 | 1 | name: Documentation |
2 | 2 |
|
| 3 | +# Publishes the docs site to the Cloudflare Worker that serves it. |
| 4 | +# |
| 5 | +# TRIGGERS ON `development`, NOT ON A `documentation` BRANCH. This file used to |
| 6 | +# listen on a branch called `documentation`; nobody has pushed to one since |
| 7 | +# 2026-05-25, so the site simply stopped being rebuilt while every docs change |
| 8 | +# merged to development satisfied its review and published nothing. |
3 | 9 | on: |
4 | | - # `development` is where the work lands. This used to trigger on a |
5 | | - # `documentation` branch that exists but nobody updates — so the workflow |
6 | | - # was green and idle while the live site aged. Measured today: |
7 | | - # softwarecatalog.conduction.nl and stackiq.conduction.nl both still serve |
8 | | - # the pre-rename "SoftwareCatalog" title while docs/docusaurus.config.js |
9 | | - # says 'Stackiq'. |
10 | 10 | push: |
11 | 11 | branches: [development] |
12 | 12 | pull_request: |
13 | 13 | branches: [development] |
14 | 14 |
|
15 | 15 | jobs: |
16 | 16 | deploy: |
17 | | - # Permission CEILING for the called documentation workflow, not a grant. |
18 | | - # The callee has three jobs and this block is their UNION, which is what the |
19 | | - # token already resolves to today: |
20 | | - # build contents: read |
21 | | - # deploy contents: write (peaceiris/actions-gh-pages pushes to gh-pages) |
22 | | - # image contents: read, packages: write (buildx push to GHCR) |
23 | | - # |
24 | | - # ⚠️ `packages: write` is load-bearing at RUNTIME, not merely statically: |
25 | | - # the callee's `build-image` input DEFAULTS TO TRUE, so the `image` job |
26 | | - # really does run on a push to `development` and really does push to |
27 | | - # GHCR. Dropping it 403s that push. |
28 | | - # |
29 | | - # It would be required even if that job were disabled, because GitHub |
30 | | - # validates the callee's DECLARED job permissions against this ceiling |
31 | | - # before dispatch — including for jobs an `if:` will skip — so a too-low |
32 | | - # ceiling makes the whole call fail to start rather than run with less. |
33 | | - permissions: |
34 | | - contents: write |
35 | | - packages: write |
36 | 17 | uses: ConductionNL/.github/.github/workflows/documentation.yml@main |
37 | | - # A reusable workflow receives NO secrets by default, and the |
38 | | - # `permissions:` block above governs the TOKEN, not the secrets. Without |
39 | | - # this block `secrets.CF_API_TOKEN` is empty inside the callee, its |
40 | | - # "Publish to the Cloudflare Worker" step skips itself on its own guard, |
41 | | - # and the run finishes GREEN having written only gh-pages — which nothing |
42 | | - # serves. The live site never changes and no check goes red to say so. |
43 | | - # |
44 | | - # Mapped explicitly rather than `secrets: inherit`, because `inherit` |
45 | | - # hands the callee EVERY secret this repo holds — signing cert and key, |
46 | | - # appstore token, deploy keys — for the sake of two Cloudflare values. |
47 | | - # This way only those two cross the boundary. |
48 | | - # |
49 | | - # The exposure above is the ONLY reason for the explicit mapping. The |
50 | | - # names are the same on both sides: the org secrets really are |
51 | | - # `CF_API_TOKEN` / `CF_ACCOUNT_ID` — the names ConductionNL/.github's own |
52 | | - # deploy-docs.yml reads directly, and the names the callee declares under |
53 | | - # `workflow_call.secrets`. |
54 | | - # |
55 | | - # This block first read `secrets.CLOUDFLARE_API_TOKEN` / |
56 | | - # `secrets.CLOUDFLARE_ACCOUNT_ID`, which are not secrets anywhere in this |
57 | | - # org. Mapping from a name that does not exist is NOT an error — it |
58 | | - # yields an empty string — so the callee's publish step would have skipped |
59 | | - # itself on its own guard and the run would still have finished green. |
60 | | - # Measured on planninq run 32760529026, where that spelling did merge: |
61 | | - # "Publish to the Cloudflare Worker" SKIPPED, the log showing |
62 | | - # `CF_API_TOKEN:` with no value. |
| 18 | + # A reusable workflow receives NO secrets by default. Without this block the |
| 19 | + # callee's publish step finds CF_API_TOKEN empty, skips itself on its own |
| 20 | + # `if:` guard, and the run finishes GREEN having changed nothing -- the |
| 21 | + # failure that left the fleet's docs sites on May builds. The names are the |
| 22 | + # same on both sides; the org secrets really are CF_API_TOKEN/CF_ACCOUNT_ID. |
63 | 23 | secrets: |
64 | 24 | CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} |
65 | 25 | CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} |
66 | 26 | with: |
67 | | - # `stackiq.conduction.nl` resolves as of 2026-08-23 — attached as a |
68 | | - # second custom domain on the SAME `softwarecatalog-docs` worker that |
69 | | - # serves `softwarecatalog.conduction.nl`. Both hosts answer 200. |
70 | | - # (The comment that used to sit here said the new host answered 000; |
71 | | - # that was true when it was written and is not any more.) |
72 | 27 | cname: stackiq.conduction.nl |
73 | 28 |
|
| 29 | + # softwarecatalog.conduction.nl is the retired hostname. It stays in docs-hosts so |
| 30 | + # existing links keep resolving, and canonical-host below turns it into a |
| 31 | + # 301 rather than a second live copy of every page. |
| 32 | + # EVERY host this worker answers on, in FULL: wrangler reconciles the |
| 33 | + # worker's triggers against this list, so a host left out is REMOVED and |
| 34 | + # goes dark. |
74 | 35 | docs-hosts: softwarecatalog.conduction.nl,stackiq.conduction.nl |
75 | | - |
76 | | - # The worker that ALREADY holds both custom domains. Without this the |
77 | | - # callee derives the name from `cname` — `stackiq-docs` — which does not |
78 | | - # exist. Deploying that would create a SECOND worker while both custom |
79 | | - # domains keep routing to `softwarecatalog-docs`: every deploy green, |
80 | | - # reaching nobody. Renaming the worker is a Cloudflare-side move, not |
81 | | - # something this file can perform. |
| 36 | + # The ONE hostname this site is reached on. Every other host in |
| 37 | + # docs-hosts answers 301 to the same path here. Before this, both hostnames |
| 38 | + # served identical content and the retired name stayed as discoverable |
| 39 | + # as the current one. |
| 40 | + canonical-host: stackiq.conduction.nl |
| 41 | + # PINNED. Deriving the name is how a deploy goes green and reaches |
| 42 | + # nobody: wrangler creates the derived worker and publishes there while |
| 43 | + # the custom domains keep routing to the real one. |
82 | 44 | worker-name: softwarecatalog-docs |
0 commit comments