Skip to content

ci(data-deploy): build the index with relaton-cli instead of Jekyll - #58

Merged
andrew2net merged 2 commits into
mainfrom
chore/data-index-relaton-cli
Aug 6, 2026
Merged

ci(data-deploy): build the index with relaton-cli instead of Jekyll#58
andrew2net merged 2 commits into
mainfrom
chore/data-index-relaton-cli

Conversation

@andrew2net

@andrew2net andrew2net commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Draft — do not enable the gem mode org-wide until relaton-cli is released with relaton index. The git mode (below) works today for piloting.

What

Replace the Jekyll-based data-deploy.yml build with a single relaton index invocation. relaton-cli reads the data repo's ./data folder and emits a self-contained, crawler-indexable index that inlines a compiled Vue+Tailwind bundle.

Companion to relaton/relaton#83 (which added relaton index).

Two source modes (source input)

  • gem (default) — gem install relaton-cli and run it. Ruby only; the released gem ships the precompiled frontend bundle. This is the steady-state path once relaton-cli is published.
  • git — check out relaton/relaton, compile the frontend on the fly (needs Node), and bundle relaton + relaton-cli from the checkout with pubid from git main (which relaton's code currently tracks). This lets a repo pilot the new index before any gem release.

Why git mode needs Node: relaton-cli's frontend/dist/ is gitignored (built at gem-release time), so a GitHub checkout must compile it (npm ci && npm run build). The gem path avoids Node because the published gem already contains the bundle.

Note: relaton index reads the data YAML directly and never invokes pubid, so the pubid pin only matters for loading relaton cleanly, not for the index output.

Compatibility

  • Stays on: workflow_call with no required inputs — existing callers (uses: …/data-deploy.yml@main) are unchanged and get gem mode.
  • Optional inputs: source, title, data-dir, mode, relaton-cli-version (gem), relaton-repo / relaton-ref (git).
  • Deploy job and default-branch gating (incl. the v2 fix) unchanged.

Pilot a repo on GitHub today

jobs:
  deploy:
    uses: relaton/support/.github/workflows/data-deploy.yml@<this-branch>
    with:
      source: git         # optionally: relaton-ref: main, title: "BIPM Index"

Rollout / blockers

  1. gem mode blocker: gem install relaton-cli must resolve to a version that has relaton index. That release hasn't happened yet; the current line is a prerelease (3.0.0.pre.alpha.1), which gem install skips by default — so pin it via relaton-cli-version (or use --pre) until a stable release. Don't switch repos to gem mode org-wide before then.
  2. Shared workflow = all repos flip at once on merge. Prefer a gradual rollout: pilot relaton-data-bipm with source: git, verify, then move others.
  3. Config no longer consumed: repos' _config.yml / Gemfile.deploy are unused. Titles derive from the repo name (<FLAVOR> Index) unless the caller passes title:.

Verification

Locally, relaton index --flavor bipm cloned relaton-data-bipm, auto-detected the v2 branch, and indexed 7,936 documents with correct raw-YAML links; the generated index.html carries the crawler DOM + embedded JSON + inlined bundle. Workflow YAML lints clean.

Replace the Jekyll-theme build (checkout jekyll-theme-relaton-data-index, merge
_config.yml, jekyll build) with a single `relaton index` run: relaton-cli reads
the repo's ./data and emits a self-contained, crawler-indexable index that
inlines a compiled Vue+Tailwind bundle (relaton/relaton#83).

Stays workflow_call with no required inputs, so existing callers are unchanged;
optional title/data-dir/mode inputs allow per-repo overrides. Deploy job and
default-branch gating are unchanged.
@andrew2net
andrew2net marked this pull request as ready for review August 6, 2026 01:00
…lease

gem (default): install the released relaton-cli (Ruby only; the gem ships the
compiled frontend). git: check out relaton/relaton, compile the frontend
(needs Node), and bundle relaton + relaton-cli from the checkout with pubid from
git main — lets a repo pilot the new index build before relaton-cli is published.
@andrew2net
andrew2net merged commit 252b47e into main Aug 6, 2026
5 checks passed
@andrew2net
andrew2net deleted the chore/data-index-relaton-cli branch August 6, 2026 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant