diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ccdb7a18..0dc1a059b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,3 +106,21 @@ jobs: - name: Run Biome CI (format & lint on changed files) run: bunx biome ci --changed --since=origin/main --no-errors-on-unmatched + + - name: Detect docs changes + id: docs-changes + run: | + if git diff --quiet "${{ github.event.pull_request.base.sha }}" HEAD -- apps/docs; then + echo "docs=false" >> "$GITHUB_OUTPUT" + else + echo "docs=true" >> "$GITHUB_OUTPUT" + fi + + # Isolated bunx avoids the monorepo React/ink hook crash from hoisted mintlify. + # mintlify@4.2.x may exit 0 even when it prints broken links. + - name: Check docs for broken internal links + if: steps.docs-changes.outputs.docs == 'true' + working-directory: apps/docs + run: | + set -o pipefail + bun run check-links 2>&1 | tee /dev/stderr | grep -q "no broken links found" diff --git a/apps/docs/ingestion/batch-ingest-historical-data.mdx b/apps/docs/ingestion/batch-ingest-historical-data.mdx index 17ff4e1bd..10230dd96 100644 --- a/apps/docs/ingestion/batch-ingest-historical-data.mdx +++ b/apps/docs/ingestion/batch-ingest-historical-data.mdx @@ -15,7 +15,7 @@ Use `POST /v3/documents/batch` to backfill exports, emails, messages, or other d Backfill dated content by setting `documentDate` on each document, sorting the source records oldest to newest, and sending them in batches. Each request can contain up to 600 documents. -**Endpoint:** [`POST /v3/documents/batch`](/api-reference/ingest/batch-add-documents) +**Endpoint:** [`POST /v3/documents/batch`](/api-reference/ingest) @@ -93,7 +93,7 @@ def backfill_historical_data(source_documents: list[dict[str, str]]) -> None: ## Optional: wait for processing to finish -**Endpoint:** [`GET /v3/documents/{id}`](/api-reference/documents/get-document) +**Endpoint:** [`GET /v3/documents/{id}`](/api-reference/ingest) The batch endpoint returns after accepting the documents. If a later step depends on completed memory generation, poll the returned document IDs until both `status` and `dreamingStatus` are `done`. diff --git a/apps/docs/package.json b/apps/docs/package.json index a3aff8c29..e42425a96 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -6,7 +6,8 @@ "portless": { "name": "docs.dev.supermemory", "script": "dev:app", "appPort": 3003 }, "scripts": { "dev": "portless", - "dev:app": "bunx mintlify@latest dev --no-open --port 3003" + "dev:app": "bunx mintlify@latest dev --no-open --port 3003", + "check-links": "bunx --bun mintlify@4.2.112 broken-links" }, "devDependencies": { "@types/bun": "latest",