Skip to content

Commit 55f9aae

Browse files
committed
site: /reference becomes the metamodel, the adopter model moves to /reference/example
/reference now serves the metamodel — every type, subtype and attribute the loader accepts — rendered in the metaobjects repo and copied from the release tag. The adopter model that used to own that URL moves to /reference/example, where it is labelled as what it is: a real project documented by meta docs, which is the one thing a self-referential metamodel page cannot demonstrate. The ordering here is load-bearing. The example step runs first, so the metamodel copy must never rm -rf www/reference — that would delete the example on every deploy. The example's own rm is narrowed to its own subdirectory for the mirror-image reason: it used to remove the whole directory, which would now take the reference with it. HELD, not pushed. v0.24.5 carries no site-reference/, so deploying this now would leave /reference showing only the example. Goes out with Task 15's held commit right after the next release. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NynrRND6ZUwGvq3ZUTCfxG
1 parent ef743d7 commit 55f9aae

3 files changed

Lines changed: 34 additions & 6 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,23 @@ jobs:
3535
# on every deploy (push to main / workflow_dispatch) — no cross-repo secrets.
3636
# --ignore-scripts skips wizardsofodd's wrangler postinstall (not needed for
3737
# docs). --prompts data/templates surfaces the actual prompt TEXT.
38-
- name: Generate wizardsofodd reference docs
38+
# A REAL PROJECT documented by `meta docs` — not "the reference". It lives at
39+
# /reference/example because a self-referential metamodel page cannot show that the
40+
# tool works on somebody's actual model, which is the only thing this demonstrates.
41+
# /reference itself is the metamodel, copied in the next step.
42+
#
43+
# The `rm` is narrowed to this subdirectory. It used to remove the whole of
44+
# www/reference, which — now that the metamodel lands there too — would delete the
45+
# reference and leave only the example behind, on every deploy.
46+
- name: Generate the example project's docs (a real model, documented by meta docs)
3947
run: |
4048
git clone --depth 1 https://github.com/Draagon/wizardsofodd.git /tmp/woo
4149
cd /tmp/woo
4250
npm ci --ignore-scripts
4351
npx meta docs . --site --prompts data/templates --out /tmp/woo-docs
44-
rm -rf "$GITHUB_WORKSPACE/www/reference"
45-
mkdir -p "$GITHUB_WORKSPACE/www/reference"
46-
cp -r /tmp/woo-docs/site/* "$GITHUB_WORKSPACE/www/reference/"
52+
rm -rf "$GITHUB_WORKSPACE/www/reference/example"
53+
mkdir -p "$GITHUB_WORKSPACE/www/reference/example"
54+
cp -r /tmp/woo-docs/site/* "$GITHUB_WORKSPACE/www/reference/example/"
4755
4856
# Snippet injection: clone metaobjects at its latest npm RELEASE TAG — not main —
4957
# and inject its committed site-payload.json into this site's data-snippet
@@ -99,6 +107,24 @@ jobs:
99107
echo "injecting snippets from metaobjects $TAG"
100108
node scripts/site-inject-ci.mjs --site "$GITHUB_WORKSPACE/www"
101109
110+
# The metamodel reference at /reference — every type, subtype and attribute the
111+
# loader accepts, rendered in the metaobjects repo and carried by the tag. It is
112+
# NOT rendered here: this workflow has setup-node and nothing else, the metaobjects
113+
# clone gets no install step, and keeping it that way is what stops a site deploy
114+
# from depending on that workspace resolving.
115+
#
116+
# A plain copy, never `rm -rf www/reference` — the previous step has already
117+
# written www/reference/example, and removing the parent would delete it on every
118+
# deploy. Nothing stale can accumulate anyway: www/reference is gitignored, so each
119+
# run starts from a checkout that does not contain it.
120+
if [ -d site-reference ]; then
121+
mkdir -p "$GITHUB_WORKSPACE/www/reference"
122+
cp -r site-reference/. "$GITHUB_WORKSPACE/www/reference/"
123+
echo "copied the metamodel reference from metaobjects $TAG"
124+
else
125+
echo "::warning::metaobjects $TAG has no site-reference/ — /reference will show only the example."
126+
fi
127+
102128
- name: Setup Pages
103129
uses: actions/configure-pages@v4
104130

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Generated at deploy time by deploy.yml (meta docs from wizardsofodd)
1+
# Built at deploy time by deploy.yml: /reference is the metamodel reference, rendered
2+
# in the metaobjects repo and copied from the release tag; /reference/example is a real
3+
# project documented by `meta docs`. Neither is authored here.
24
www/reference/
35

46
# Copied from the metaobjects repo at deploy (docs/llms/*), pinned to the release tag.

www/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<a href="/requirements.html" class="nav-link">Requirements</a>
3434
<a href="/story.html" class="nav-link">Story</a>
3535
<a href="/videos.html" class="nav-link">Videos</a>
36-
<a href="/reference/" class="nav-link">Reference docs</a>
36+
<a href="/reference/" class="nav-link">Reference</a>
3737
<a href="https://github.com/metaobjectsdev/metaobjects" class="nav-link">GitHub</a>
3838
<a href="#ai" class="nav-link">For AI</a>
3939
<a href="https://github.com/metaobjectsdev/metaobjects/tree/main/spec" class="nav-link nav-cta">Spec</a>

0 commit comments

Comments
 (0)