From f1baea448038131ef5d8d0666de5f39f5a6ca39c Mon Sep 17 00:00:00 2001 From: Leo Date: Sun, 31 May 2026 14:45:34 -0400 Subject: [PATCH] fix: deploy docs production app --- .github/workflows/production.yml | 7 + ...-ready-completion-audit-report.schema.json | 62 ++++++ .../_data/agent-ready-live-report.schema.json | 47 ++++ .../agent-ready-production-report.schema.json | 205 ++++++++++++++++++ .../agent-ready-status-report.schema.json | 86 ++++++++ .../route.ts | 2 +- .../route.ts | 2 +- .../route.ts | 2 +- .../route.ts | 2 +- apps/fumadocs/vercel.json | 6 + scripts/docs-schema-copies.test.ts | 19 ++ 11 files changed, 436 insertions(+), 4 deletions(-) create mode 100644 apps/fumadocs/src/app/schemas/_data/agent-ready-completion-audit-report.schema.json create mode 100644 apps/fumadocs/src/app/schemas/_data/agent-ready-live-report.schema.json create mode 100644 apps/fumadocs/src/app/schemas/_data/agent-ready-production-report.schema.json create mode 100644 apps/fumadocs/src/app/schemas/_data/agent-ready-status-report.schema.json create mode 100644 apps/fumadocs/vercel.json create mode 100644 scripts/docs-schema-copies.test.ts diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 4cfb040..ac133f2 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -50,3 +50,10 @@ jobs: - name: Deploy Vercel production run: bunx vercel deploy --prebuilt --prod --yes --token "$VERCEL_TOKEN" + + - name: Deploy docs production + env: + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_DOCS_PROJECT_ID }} + run: | + cd apps/fumadocs + bunx vercel deploy --prod --yes --token "$VERCEL_TOKEN" diff --git a/apps/fumadocs/src/app/schemas/_data/agent-ready-completion-audit-report.schema.json b/apps/fumadocs/src/app/schemas/_data/agent-ready-completion-audit-report.schema.json new file mode 100644 index 0000000..0728444 --- /dev/null +++ b/apps/fumadocs/src/app/schemas/_data/agent-ready-completion-audit-report.schema.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://docs.amend.sh/schemas/agent-ready-completion-audit-report.schema.json", + "title": "Amend Agent-Ready Completion Audit Report", + "type": "object", + "additionalProperties": false, + "required": [ + "$schema", + "allowProductionBlockers", + "checkedAt", + "checks", + "completionOk", + "missingOrBlocked", + "ok", + "productionBlockersOnly", + "productionReportPath", + "summary" + ], + "properties": { + "$schema": { + "type": "string", + "const": "https://docs.amend.sh/schemas/agent-ready-completion-audit-report.schema.json" + }, + "allowProductionBlockers": { "type": "boolean" }, + "checkedAt": { "type": "string", "format": "date-time" }, + "checks": { + "type": "array", + "items": { "$ref": "#/$defs/check" } + }, + "completionOk": { "type": "boolean" }, + "missingOrBlocked": { + "type": "array", + "items": { "$ref": "#/$defs/check" } + }, + "ok": { "type": "boolean" }, + "productionBlockersOnly": { "type": "boolean" }, + "productionReportPath": { "type": "string", "minLength": 1 }, + "summary": { "$ref": "#/$defs/summary" } + }, + "$defs": { + "check": { + "type": "object", + "additionalProperties": false, + "required": ["name", "ok"], + "properties": { + "detail": { "type": "string" }, + "name": { "type": "string", "minLength": 1 }, + "ok": { "type": "boolean" } + } + }, + "summary": { + "type": "object", + "additionalProperties": false, + "required": ["failed", "passed", "total"], + "properties": { + "failed": { "type": "integer", "minimum": 0 }, + "passed": { "type": "integer", "minimum": 0 }, + "total": { "type": "integer", "minimum": 0 } + } + } + } +} diff --git a/apps/fumadocs/src/app/schemas/_data/agent-ready-live-report.schema.json b/apps/fumadocs/src/app/schemas/_data/agent-ready-live-report.schema.json new file mode 100644 index 0000000..83d9cc0 --- /dev/null +++ b/apps/fumadocs/src/app/schemas/_data/agent-ready-live-report.schema.json @@ -0,0 +1,47 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://docs.amend.sh/schemas/agent-ready-live-report.schema.json", + "title": "Amend Agent-Ready Live Report", + "type": "object", + "additionalProperties": false, + "required": ["$schema", "blockers", "checkedAt", "checks", "ok", "origins", "passed", "total"], + "properties": { + "$schema": { + "type": "string", + "const": "https://docs.amend.sh/schemas/agent-ready-live-report.schema.json" + }, + "blockers": { + "type": "array", + "items": { "type": "string", "minLength": 1 } + }, + "checkedAt": { "type": "string", "format": "date-time" }, + "checks": { + "type": "array", + "items": { "$ref": "#/$defs/check" } + }, + "ok": { "type": "boolean" }, + "origins": { + "type": "object", + "additionalProperties": false, + "required": ["docs", "web"], + "properties": { + "docs": { "type": "string", "format": "uri" }, + "web": { "type": "string", "format": "uri" } + } + }, + "passed": { "type": "integer", "minimum": 0 }, + "total": { "type": "integer", "minimum": 0 } + }, + "$defs": { + "check": { + "type": "object", + "additionalProperties": false, + "required": ["name", "ok"], + "properties": { + "detail": { "type": "string" }, + "name": { "type": "string", "minLength": 1 }, + "ok": { "type": "boolean" } + } + } + } +} diff --git a/apps/fumadocs/src/app/schemas/_data/agent-ready-production-report.schema.json b/apps/fumadocs/src/app/schemas/_data/agent-ready-production-report.schema.json new file mode 100644 index 0000000..002a1fc --- /dev/null +++ b/apps/fumadocs/src/app/schemas/_data/agent-ready-production-report.schema.json @@ -0,0 +1,205 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://docs.amend.sh/schemas/agent-ready-production-report.schema.json", + "title": "Amend Agent-Ready Production Report", + "type": "object", + "additionalProperties": false, + "required": ["$schema", "blockers", "checkedAt", "ok", "steps"], + "properties": { + "$schema": { + "type": "string", + "const": "https://docs.amend.sh/schemas/agent-ready-production-report.schema.json" + }, + "blockers": { + "type": "array", + "items": { "type": "string", "minLength": 1 } + }, + "checkedAt": { + "type": "string", + "format": "date-time" + }, + "ok": { + "type": "boolean" + }, + "steps": { + "type": "object", + "additionalProperties": false, + "required": ["built", "live", "readinessStrict", "status"], + "properties": { + "built": { "$ref": "#/$defs/summaryStep" }, + "live": { "$ref": "#/$defs/liveStep" }, + "readinessStrict": { "$ref": "#/$defs/summaryStep" }, + "status": { "$ref": "#/$defs/statusStep" } + } + } + }, + "$defs": { + "check": { + "type": "object", + "additionalProperties": false, + "required": ["name", "ok"], + "properties": { + "detail": { "type": "string" }, + "name": { "type": "string", "minLength": 1 }, + "ok": { "type": "boolean" } + } + }, + "dnsHost": { + "type": "object", + "additionalProperties": false, + "required": ["delegated", "host", "records", "registered"], + "properties": { + "delegated": { "type": "boolean" }, + "host": { "type": "string", "minLength": 1 }, + "records": { + "type": "array", + "items": { "type": "string" } + }, + "registered": { "type": "boolean" } + } + }, + "liveReport": { + "type": "object", + "additionalProperties": false, + "required": [ + "$schema", + "blockers", + "checkedAt", + "checks", + "ok", + "origins", + "passed", + "total" + ], + "properties": { + "$schema": { + "type": "string", + "const": "https://docs.amend.sh/schemas/agent-ready-live-report.schema.json" + }, + "blockers": { + "type": "array", + "items": { "type": "string", "minLength": 1 } + }, + "checkedAt": { "type": "string", "format": "date-time" }, + "checks": { + "type": "array", + "items": { "$ref": "#/$defs/check" } + }, + "ok": { "type": "boolean" }, + "origins": { "$ref": "#/$defs/origins" }, + "passed": { "type": "integer", "minimum": 0 }, + "total": { "type": "integer", "minimum": 0 } + } + }, + "origins": { + "type": "object", + "additionalProperties": false, + "required": ["docs", "web"], + "properties": { + "docs": { "type": "string", "format": "uri" }, + "web": { "type": "string", "format": "uri" } + } + }, + "productionEnv": { + "type": "object", + "additionalProperties": false, + "required": ["missing", "passed", "total"], + "properties": { + "missing": { + "type": "array", + "items": { "type": "string", "minLength": 1 } + }, + "passed": { "type": "integer", "minimum": 0 }, + "total": { "type": "integer", "minimum": 0 } + } + }, + "statusReport": { + "type": "object", + "additionalProperties": false, + "required": [ + "$schema", + "blockers", + "checkedAt", + "dns", + "nextGates", + "ok", + "origins", + "productionEnv" + ], + "properties": { + "$schema": { + "type": "string", + "const": "https://docs.amend.sh/schemas/agent-ready-status-report.schema.json" + }, + "blockers": { + "type": "array", + "items": { "type": "string", "minLength": 1 } + }, + "checkedAt": { "type": "string", "format": "date-time" }, + "dns": { + "type": "object", + "additionalProperties": false, + "required": ["docs", "web"], + "properties": { + "docs": { "$ref": "#/$defs/dnsHost" }, + "web": { "$ref": "#/$defs/dnsHost" } + } + }, + "nextGates": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "prefixItems": [ + { "type": "string", "const": "bun run agent-ready:production" }, + { "type": "string", "const": "bun run agent-ready:final-gate" } + ], + "items": false + }, + "ok": { "type": "boolean" }, + "origins": { "$ref": "#/$defs/origins" }, + "productionEnv": { "$ref": "#/$defs/productionEnv" } + } + }, + "summary": { + "type": "object", + "additionalProperties": false, + "required": ["passed", "total"], + "properties": { + "passed": { "type": "integer", "minimum": 0 }, + "total": { "type": "integer", "minimum": 0 } + } + }, + "summaryStep": { + "type": "object", + "additionalProperties": false, + "required": ["exitCode", "ok"], + "properties": { + "exitCode": { "type": "integer", "minimum": 0 }, + "ok": { "type": "boolean" }, + "summary": { "$ref": "#/$defs/summary" } + } + }, + "liveStep": { + "type": "object", + "additionalProperties": false, + "required": ["exitCode", "ok", "report"], + "properties": { + "exitCode": { "type": "integer", "minimum": 0 }, + "ok": { "type": "boolean" }, + "report": { "$ref": "#/$defs/liveReport" }, + "summary": { "$ref": "#/$defs/summary" } + } + }, + "statusStep": { + "type": "object", + "additionalProperties": false, + "required": ["exitCode", "ok", "report"], + "properties": { + "exitCode": { "type": "integer", "minimum": 0 }, + "ok": { "type": "boolean" }, + "report": { "$ref": "#/$defs/statusReport" }, + "summary": { "$ref": "#/$defs/summary" } + } + } + } +} diff --git a/apps/fumadocs/src/app/schemas/_data/agent-ready-status-report.schema.json b/apps/fumadocs/src/app/schemas/_data/agent-ready-status-report.schema.json new file mode 100644 index 0000000..763fc29 --- /dev/null +++ b/apps/fumadocs/src/app/schemas/_data/agent-ready-status-report.schema.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://docs.amend.sh/schemas/agent-ready-status-report.schema.json", + "title": "Amend Agent-Ready Status Report", + "type": "object", + "additionalProperties": false, + "required": [ + "$schema", + "blockers", + "checkedAt", + "dns", + "nextGates", + "ok", + "origins", + "productionEnv" + ], + "properties": { + "$schema": { + "type": "string", + "const": "https://docs.amend.sh/schemas/agent-ready-status-report.schema.json" + }, + "blockers": { + "type": "array", + "items": { "type": "string", "minLength": 1 } + }, + "checkedAt": { "type": "string", "format": "date-time" }, + "dns": { + "type": "object", + "additionalProperties": false, + "required": ["docs", "web"], + "properties": { + "docs": { "$ref": "#/$defs/dnsHost" }, + "web": { "$ref": "#/$defs/dnsHost" } + } + }, + "nextGates": { + "type": "array", + "minItems": 2, + "maxItems": 2, + "prefixItems": [ + { "type": "string", "const": "bun run agent-ready:production" }, + { "type": "string", "const": "bun run agent-ready:final-gate" } + ], + "items": false + }, + "ok": { "type": "boolean" }, + "origins": { + "type": "object", + "additionalProperties": false, + "required": ["docs", "web"], + "properties": { + "docs": { "type": "string", "format": "uri" }, + "web": { "type": "string", "format": "uri" } + } + }, + "productionEnv": { + "type": "object", + "additionalProperties": false, + "required": ["missing", "passed", "total"], + "properties": { + "missing": { + "type": "array", + "items": { "type": "string", "minLength": 1 } + }, + "passed": { "type": "integer", "minimum": 0 }, + "total": { "type": "integer", "minimum": 0 } + } + } + }, + "$defs": { + "dnsHost": { + "type": "object", + "additionalProperties": false, + "required": ["delegated", "host", "records", "registered"], + "properties": { + "delegated": { "type": "boolean" }, + "host": { "type": "string", "minLength": 1 }, + "records": { + "type": "array", + "items": { "type": "string" } + }, + "registered": { "type": "boolean" } + } + } + } +} diff --git a/apps/fumadocs/src/app/schemas/agent-ready-completion-audit-report.schema.json/route.ts b/apps/fumadocs/src/app/schemas/agent-ready-completion-audit-report.schema.json/route.ts index e71283e..8545c93 100644 --- a/apps/fumadocs/src/app/schemas/agent-ready-completion-audit-report.schema.json/route.ts +++ b/apps/fumadocs/src/app/schemas/agent-ready-completion-audit-report.schema.json/route.ts @@ -1,4 +1,4 @@ -import schema from "../../../../../../docs/agent-ready-completion-audit-report.schema.json"; +import schema from "../_data/agent-ready-completion-audit-report.schema.json"; export const revalidate = false; diff --git a/apps/fumadocs/src/app/schemas/agent-ready-live-report.schema.json/route.ts b/apps/fumadocs/src/app/schemas/agent-ready-live-report.schema.json/route.ts index 2e331ca..9824053 100644 --- a/apps/fumadocs/src/app/schemas/agent-ready-live-report.schema.json/route.ts +++ b/apps/fumadocs/src/app/schemas/agent-ready-live-report.schema.json/route.ts @@ -1,4 +1,4 @@ -import schema from "../../../../../../docs/agent-ready-live-report.schema.json"; +import schema from "../_data/agent-ready-live-report.schema.json"; export const revalidate = false; diff --git a/apps/fumadocs/src/app/schemas/agent-ready-production-report.schema.json/route.ts b/apps/fumadocs/src/app/schemas/agent-ready-production-report.schema.json/route.ts index 44ef74b..88f0b22 100644 --- a/apps/fumadocs/src/app/schemas/agent-ready-production-report.schema.json/route.ts +++ b/apps/fumadocs/src/app/schemas/agent-ready-production-report.schema.json/route.ts @@ -1,4 +1,4 @@ -import schema from "../../../../../../docs/agent-ready-production-report.schema.json"; +import schema from "../_data/agent-ready-production-report.schema.json"; export const revalidate = false; diff --git a/apps/fumadocs/src/app/schemas/agent-ready-status-report.schema.json/route.ts b/apps/fumadocs/src/app/schemas/agent-ready-status-report.schema.json/route.ts index 6b8c9b3..8b24a21 100644 --- a/apps/fumadocs/src/app/schemas/agent-ready-status-report.schema.json/route.ts +++ b/apps/fumadocs/src/app/schemas/agent-ready-status-report.schema.json/route.ts @@ -1,4 +1,4 @@ -import schema from "../../../../../../docs/agent-ready-status-report.schema.json"; +import schema from "../_data/agent-ready-status-report.schema.json"; export const revalidate = false; diff --git a/apps/fumadocs/vercel.json b/apps/fumadocs/vercel.json new file mode 100644 index 0000000..2a7bf22 --- /dev/null +++ b/apps/fumadocs/vercel.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "framework": "nextjs", + "installCommand": "bun install", + "buildCommand": "bun run build" +} diff --git a/scripts/docs-schema-copies.test.ts b/scripts/docs-schema-copies.test.ts new file mode 100644 index 0000000..8ad9e0c --- /dev/null +++ b/scripts/docs-schema-copies.test.ts @@ -0,0 +1,19 @@ +import { describe, expect, test } from "bun:test"; + +const schemaNames = [ + "agent-ready-completion-audit-report.schema.json", + "agent-ready-live-report.schema.json", + "agent-ready-production-report.schema.json", + "agent-ready-status-report.schema.json", +]; + +describe("docs schema route copies", () => { + for (const schemaName of schemaNames) { + test(`${schemaName} matches the canonical docs schema`, async () => { + const canonical = await Bun.file(`docs/${schemaName}`).text(); + const routeCopy = await Bun.file(`apps/fumadocs/src/app/schemas/_data/${schemaName}`).text(); + + expect(routeCopy).toBe(canonical); + }); + } +});