Skip to content

Commit 157992e

Browse files
authored
deploy: build the example docs with meta gen --generators docs-site (#4)
MetaObjects 1.1.0 removed `meta docs`. The example project now declares docsSiteFile in its config, so the deploy runs `meta gen --generators docs-site` and copies docs/generated/site into www/reference/example.
1 parent d038a11 commit 157992e

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,30 @@ jobs:
3030
node-version: 22
3131

3232
# Deploy-time reference-doc generation: clone the public wizardsofodd
33-
# reference impl, run `meta docs` (published @metaobjectsdev/cli), and drop the
33+
# reference impl, run `meta gen --generators docs-site` (published @metaobjectsdev/cli), and drop the
3434
# browsable site into www/reference/ so it publishes with the site. Regenerates
3535
# on every deploy (push to main / workflow_dispatch) — no cross-repo secrets.
3636
# --ignore-scripts skips wizardsofodd's wrangler postinstall (not needed for
37-
# docs). --prompts data/templates surfaces the actual prompt TEXT.
38-
# A REAL PROJECT documented by `meta docs` — not "the reference". It lives at
37+
# docs). The clone's own metaobjects.config.ts declares docsSiteFile with
38+
# prompts: "data/templates" (which surfaces the actual prompt TEXT) and a docs
39+
# output target of ./docs/generated, so the site lands in docs/generated/site.
40+
# A REAL PROJECT documented by `meta gen` — not "the reference". It lives at
3941
# /reference/example because a self-referential metamodel page cannot show that the
4042
# tool works on somebody's actual model, which is the only thing this demonstrates.
4143
# /reference itself is the metamodel, copied in the next step.
4244
#
4345
# The `rm` is narrowed to this subdirectory. It used to remove the whole of
4446
# www/reference, which — now that the metamodel lands there too — would delete the
4547
# 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)
48+
- name: Generate the example project's docs (a real model, documented by meta gen)
4749
run: |
4850
git clone --depth 1 https://github.com/Draagon/wizardsofodd.git /tmp/woo
4951
cd /tmp/woo
5052
npm ci --ignore-scripts
51-
npx meta docs . --site --prompts data/templates --out /tmp/woo-docs
53+
npx meta gen --generators docs-site
5254
rm -rf "$GITHUB_WORKSPACE/www/reference/example"
5355
mkdir -p "$GITHUB_WORKSPACE/www/reference/example"
54-
cp -r /tmp/woo-docs/site/* "$GITHUB_WORKSPACE/www/reference/example/"
56+
cp -r /tmp/woo/docs/generated/site/* "$GITHUB_WORKSPACE/www/reference/example/"
5557
5658
# Snippet injection: clone metaobjects at its latest npm RELEASE TAG — not main —
5759
# and inject its committed site-payload.json into this site's data-snippet

0 commit comments

Comments
 (0)