mirror of
https://github.com/hanzoai/store.git
synced 2026-10-30 14:54:46 +00:00
main moved the store off GitHub Pages onto the Sites plane and added the one Hanzo telemetry client while this convergence was in flight. The two are orthogonal — deployment and styling — so main's decision is taken whole. Three files needed a hand: app/layout.tsx — keep main's <Analytics> wrapping <Providers>, keep this branch's `dark` on <html>, and keep <body> bare: `antialiased bg-background text-foreground` were Tailwind utilities, and globals.css states all three on `html, body` directly now. LLM.md — main appended "How it ships" to the document this branch had already replaced. Carried it in as its own section rather than dropping it, renumbered the rest, and folded in the telemetry note. package.json — @hanzo/event ^0.3.11 added to the converged dependency set. One thing did NOT survive contact: the CSS check ran from `postbuild`, and deploy.yml runs `npm run build`. Shipping a static export would have started downloading a browser, and would have failed outright on a runner without one. It is now `npm run css-check`, invoked by ci.yml's build job — which installs chromium for it — so building compiles and CI verifies. deploy.yml is untouched. Verified on the merged tree, cold: npm ci through the repo's own .npmrc (pkg.hanzo.ai, now serving 8.0.47) with a throwaway cache, exit 0. typecheck clean, 209 pages exported, css-check 227/227, e2e 21/21. At 390 and 1280 across home, an app record and a document: Geist and Geist Mono both loaded, body rgb(20,20,20) on rgb(255,255,255) at 18.42:1, zero serif fallbacks, no sideways scroll, and all 632 buttons at 32/36/40 with minHeight equal to the box and none clipped. Co-authored-by: Hanzo Dev <[email protected]>
84 lines
2.9 KiB
YAML
84 lines
2.9 KiB
YAML
name: CI
|
|
# Moved from .github/workflows/build-deploy.yml. This forge collects workflows
|
|
# from the FIRST of WORKFLOW_DIRS that exists, so once .hanzo/workflows/deploy.yml
|
|
# landed, anything left under .github/workflows stopped running here — silently,
|
|
# with a green repo.
|
|
#
|
|
# The `deploy` job that used to close that file (upload-pages-artifact +
|
|
# deploy-pages) is GONE, not disabled: store.hanzo.ai ships as
|
|
# ghcr.io/hanzoai/store via deploy.yml. What remains is what this file was
|
|
# actually worth — the catalog JSON gate, which is the only thing standing
|
|
# between a malformed data/agents/*.json and a broken storefront.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
validate:
|
|
name: Validate App JSONs
|
|
runs-on: hanzo-build-linux-amd64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Validate JSON files
|
|
run: |
|
|
for dir in data/agents data/tools; do
|
|
if [ -d "$dir" ]; then
|
|
echo "Validating $dir..."
|
|
for file in $dir/*.json; do
|
|
[ -e "$file" ] || continue
|
|
echo " Checking $file"
|
|
if ! jq empty "$file" 2>/dev/null; then
|
|
echo "Invalid JSON in $file"
|
|
exit 1
|
|
fi
|
|
# Check required fields
|
|
for field in id name description version author category tags createdAt updatedAt; do
|
|
if ! jq -e ".$field" "$file" >/dev/null; then
|
|
echo "Missing required field '$field' in $file"
|
|
exit 1
|
|
fi
|
|
done
|
|
done
|
|
echo "All files valid in $dir"
|
|
fi
|
|
done
|
|
|
|
build:
|
|
name: Build Store
|
|
needs: validate
|
|
runs-on: hanzo-build-linux-amd64
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --legacy-peer-deps
|
|
|
|
- name: Generate store data
|
|
run: npm run generate-store
|
|
|
|
# A compile gate, nothing more. The artifact this job used to upload existed
|
|
# only to hand ./out to the Pages deploy; what ships now is the image.
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
# The compile gate above proves the imports resolved and nothing more. This
|
|
# one renders the export and fails if the markup uses a class no delivered
|
|
# sheet defines — see scripts/css-check.mjs for why it has to render rather
|
|
# than read out/. It lives here and NOT in `postbuild` on purpose: deploy.yml
|
|
# also runs `npm run build`, and shipping a static site should not require
|
|
# downloading a browser. Verification is this job's business.
|
|
- name: Install Chromium for the CSS check
|
|
run: npx playwright install --with-deps chromium
|
|
|
|
- name: Check every rendered class has a rule
|
|
run: npm run css-check
|