Start the docs site's Vercel build from CI · PascalPixel/alchemy@e123af3 · GitHub
Skip to content

Commit e123af3

Browse files
PascalPixelclaude
andcommitted
Start the docs site's Vercel build from CI
The docs now build on Vercel from alchemy-docs, which no longer has a Pages workflow to dispatch. After a successful main CI, docs.yml posts to the project's deploy hook instead; the site takes the accepted progress figures from the decomp-reports release, so README shows them from alchemy.pascalpixel.com. docs.ref and the dispatch token go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 9ff0213 commit e123af3

5 files changed

Lines changed: 24 additions & 40 deletions

File tree

‎.github/docs.ref‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎.github/publication.md‎

Lines changed: 13 additions & 15 deletions

‎.github/workflows/docs.yml‎

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ permissions:
1717
contents: read
1818

1919
concurrency:
20-
group: docs-dispatch
20+
group: docs-deploy
2121
cancel-in-progress: false
2222

2323
jobs:
24-
dispatch:
24+
deploy:
2525
if: >-
2626
github.repository == 'PascalPixel/alchemy' &&
2727
(github.event_name == 'workflow_dispatch' ||
@@ -41,29 +41,16 @@ jobs:
4141
jq -e '.path == ".github/workflows/build.yml" and .head_branch == "main" and .conclusion == "success" and (.event == "push" or .event == "workflow_dispatch") and .head_repository.full_name == "PascalPixel/alchemy"' "$RUNNER_TEMP/run.json"
4242
source=$(jq -r .head_sha "$RUNNER_TEMP/run.json")
4343
latest=$(gh api repos/PascalPixel/alchemy/commits/main --jq .sha)
44-
echo "sha=$source" >> "$GITHUB_OUTPUT"
45-
echo "run=$RUN_ID" >> "$GITHUB_OUTPUT"
4644
if test "$source" = "$latest"; then
4745
echo "current=true" >> "$GITHUB_OUTPUT"
4846
else
4947
echo "Skipping a superseded source revision."
5048
fi
5149
52-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
53-
if: steps.source.outputs.current == 'true'
54-
with:
55-
ref: ${{ steps.source.outputs.sha }}
56-
persist-credentials: false
57-
58-
- name: Trigger the pinned docs generator in its own repository
50+
- name: Start the site build on Vercel
5951
if: steps.source.outputs.current == 'true'
6052
env:
61-
GH_TOKEN: ${{ secrets.ALCHEMY_DOCS_TOKEN }}
62-
SOURCE_SHA: ${{ steps.source.outputs.sha }}
63-
SOURCE_RUN: ${{ steps.source.outputs.run }}
53+
HOOK: ${{ secrets.VERCEL_DEPLOY_HOOK }}
6454
run: |
65-
test -n "$GH_TOKEN" || { echo 'Set ALCHEMY_DOCS_TOKEN: a fine-grained token for alchemy-docs with Actions write permission.' >&2; exit 1; }
66-
docs=$(cat .github/docs.ref)
67-
[[ "$docs" =~ ^[0-9a-f]{40}$ ]]
68-
gh workflow run pages.yml --repo PascalPixel/alchemy-docs --ref main \
69-
-f alchemy_commit="$SOURCE_SHA" -f alchemy_run="$SOURCE_RUN" -f docs_commit="$docs"
55+
test -n "$HOOK" || { echo 'Set VERCEL_DEPLOY_HOOK: the deploy hook of the alchemy Vercel project.' >&2; exit 1; }
56+
curl --fail --silent --show-error --request POST "$HOOK"

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Never: commit or publish a ROM or game files (L1); use another project's Golden
7070

7171
- **C1** A function counts only when its whole extent, literal pool included, compiles exactly and every edition stays byte-identical, and in an edition only when that edition links its C. _Check: make compare-editions._
7272
- **C2** DONE is pret's calcrom over the linker maps, by folder: bytes placed from `games/` are done, from `recon/` not yet. Each image counts from its first to its last placed byte (overlays once, unpacked). Code is `.text` (C, assembly, 8-byte stubs and the compiler library reported apart); data is everything else. A game's figure sums its six editions; 100% needs both at 100% in all six.
73-
- **C3** Every push to main carries its measurement: stage all source changes, then `make land` compares, tests and measures the same tree; the pre-push hook uploads immutable reports and their timestamped receipt to `decomp-reports`. After the public build passes, CI validates the receipt, archives the figures and accepts the measurement. Successful CI triggers the pinned `alchemy-docs` generator, which owns Pages and README's figures. The old `progress` branch is a frozen archive, never updated. `.github/publication.md` describes publication and recovery.
73+
- **C3** Every push to main carries its measurement: stage all source changes, then `make land` compares, tests and measures the same tree; the pre-push hook uploads immutable reports and their timestamped receipt to `decomp-reports`. After the public build passes, CI validates the receipt, archives the figures and accepts the measurement. Successful CI starts the `alchemy-docs` site build on Vercel through a deploy hook; that site serves the docs and README's figures. The old `progress` branch is a frozen archive, never updated. `.github/publication.md` describes publication and recovery.
7474

7575
### The oracle stays out of the build
7676

@@ -103,7 +103,7 @@ The reference ROM judges the build and never feeds it. Reconstructing Camelot's
103103
- A trailing note on any declaration (a field, enumerator, table column, macro or global) is `///<`, its continuation lines too.
104104
- FAKEMATCH tags, `// BUG:`, `// DEAD:` and comments inside function bodies stay as they are: they describe matching, not the interface. So do a block a blank line separates from what follows, a section heading or label over a run of declarations, a comment above `#if` or `#include`, and `// clang-format off` and `on`, which clang-format reads only in that form.
105105
- A folder's README.md is its page: it opens with a `#` heading unique across the repository that names the folder (`# Battle effects`), with a `{#label}` only where something links to it. Links between READMEs and code use relative paths and plain function names.
106-
- Doxygen's settings live with the docs tooling, never as markup in the source beyond these.
106+
- The docs site's settings live in `alchemy-docs`, never as markup in the source beyond these.
107107
- Formatting: clang-format's LLVM style, as `.clang-format` records it; include order is left alone, since it decides which declarations are in scope.
108108
- Numbers stay numbers until evidence gives them a meaning; a constant never invents an address or table id. Messages are linker symbols written by bare name, `MSGNO(name)` their number. Flags and sounds come from `flags.h` and `songs.h`: `FLAG_`, `MUS_`, `SE_`, only proven names, an unproven sound its kind and number (`SE_138`); a temporary flag is `FLAG_SCENE_TEMP_xx` with a comment per scene.
109109
- Values are in the author's units (scene coordinates in pixels). Scenes are written in `event.h` commands.

‎README.md‎

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)