Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 37 additions & 23 deletions .github/workflows/docs-typedoc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: TypeDoc

# Regenerates the TypeScript API reference (TypeDoc) into the Antora docs
# component at docs/modules/ROOT/attachments/api/typescript/ and commits the
# result to main. The Antora attachments family is published verbatim by the
# labs-pages docs build, so the API reference ships with the rest of the docs
# site — no GitHub Pages involved.

on:
push:
branches: [main]
Expand All @@ -8,28 +14,18 @@ on:
- 'typescript/typedoc.json'
- 'typescript/package.json'
- '.github/workflows/docs-typedoc.yml'
tags:
- 'typescript-v*'
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write
contents: write

concurrency:
group: 'typedoc'
cancel-in-progress: true

jobs:
build-deploy:
build-commit:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
defaults:
run:
working-directory: typescript
steps:
- uses: actions/checkout@v4

Expand All @@ -41,20 +37,38 @@ jobs:
cache-dependency-path: typescript/package-lock.json

- name: Install dependencies
working-directory: typescript
run: npm ci

- name: Build TypeDoc
- name: Build TypeDoc into Antora attachments
# Output path is set in typescript/typedoc.json:
# ../docs/modules/ROOT/attachments/api/typescript
working-directory: typescript
run: npm run docs:api

- name: Setup Pages
uses: actions/configure-pages@v5
- name: Commit regenerated API reference
id: commit
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add docs/modules/ROOT/attachments/api/typescript
if git diff --cached --quiet; then
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "TypeDoc output unchanged; nothing to commit."
else
git commit -m "docs(typescript): regenerate TypeDoc API reference"
git pull --rebase origin main
git push origin main
echo "changed=true" >> "$GITHUB_OUTPUT"
fi

- name: Upload TypeDoc artifact
uses: actions/upload-pages-artifact@v3
# Pushes made with GITHUB_TOKEN do not trigger other workflows, so
# trigger-labs-build.yml won't fire for the commit above — dispatch the
# labs-pages rebuild directly.
- name: Trigger Labs Pages rebuild
if: steps.commit.outputs.changed == 'true'
uses: peter-evans/repository-dispatch@v3
with:
# Matches `out` in typescript/typedoc.json
path: typescript/docs-api

- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4
token: ${{ secrets.LABS_PAGES_TOKEN }}
repository: neo4j-contrib/labs-pages
event-type: agent-memory-docs-update
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ yarn-error.log*
typescript/node_modules/
typescript/dist/
typescript/.tsbuildinfo
typescript/docs-api/
typescript/examples/*/node_modules/
typescript/examples/*/package-lock.json

Expand Down
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2421,6 +2421,8 @@ When adding or modifying documentation:
- **Builder**: Antora (`antora antora-playbook.yml`) with the Neo4j Labs UI bundle
- **Navigation**: `docs/modules/ROOT/nav.adoc` (single source, hand-maintained)
- **Output**: Static HTML in `docs/build/site/`
- **Deployment**: Neo4j Labs Pages — pushes to `main` touching `docs/**` dispatch a rebuild of `neo4j-contrib/labs-pages` (`.github/workflows/trigger-labs-build.yml`), which consumes this repo's Antora component and publishes to `neo4j.com/labs/agent-memory`
- **TypeScript API reference**: TypeDoc output is generated into `docs/modules/ROOT/attachments/api/typescript/` (Antora attachments, published verbatim with the docs site) and kept fresh by `.github/workflows/docs-typedoc.yml`, which commits regenerated output to `main` and dispatches the labs-pages rebuild. `typescript/typedoc.json` sets the output path; run `npm run docs:api` in `typescript/` to regenerate locally.
- **Deployment**: Vercel (`docs/vercel.json`, `outputDirectory: build/site`; auto-deploys on push to main)

<!-- OPENWIKI:START -->
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ This project uses GitHub Actions for continuous integration and deployment.
| **TypeScript E2E** (`e2e-typescript.yml`) | Push, PR, nightly | Run TypeScript SDK e2e suite against live NAMS sandbox (uses `MEMORY_API_KEY` secret) |
| **Publish Python** (`publish-python.yml`) | Git tags `python-v*` | Build and publish to PyPI, create GitHub releases |
| **Publish TypeScript** (`publish-typescript.yml`) | Git tags `typescript-v*` | Build and publish to npm with provenance |
| **TypeDoc** (`docs-typedoc.yml`) | Push to `main` (TS docs paths) or `typescript-v*` tags | Build TypeDoc API reference, deploy to GitHub Pages |
| **TypeDoc** (`docs-typedoc.yml`) | Push to `main` (TS docs paths) | Regenerate TypeDoc API reference into `docs/modules/ROOT/attachments/api/typescript/`, commit to `main`, and dispatch the labs-pages docs rebuild |
| **TCK Conformance** (`tck-conformance.yml`) | Nightly + workflow_dispatch | Run agent-memory-tck Bronze suite against the published `@neo4j-labs/agent-memory` package |
| **NAMS Integration** (`nams-integration.yml`) | Push, PR, nightly | Run NAMS sandbox integration tests (Python side, uses `NAMS_SANDBOX_KEY` secret) |

Expand Down
1 change: 1 addition & 0 deletions docs/modules/ROOT/attachments/api/typescript/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
92 changes: 92 additions & 0 deletions docs/modules/ROOT/attachments/api/typescript/assets/highlight.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
:root {
--light-hl-0: #795E26;
--dark-hl-0: #DCDCAA;
--light-hl-1: #000000;
--dark-hl-1: #D4D4D4;
--light-hl-2: #A31515;
--dark-hl-2: #CE9178;
--light-hl-3: #AF00DB;
--dark-hl-3: #C586C0;
--light-hl-4: #001080;
--dark-hl-4: #9CDCFE;
--light-hl-5: #0000FF;
--dark-hl-5: #569CD6;
--light-hl-6: #0070C1;
--dark-hl-6: #4FC1FF;
--light-hl-7: #267F99;
--dark-hl-7: #4EC9B0;
--light-hl-8: #008000;
--dark-hl-8: #6A9955;
--light-hl-9: #098658;
--dark-hl-9: #B5CEA8;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}

@media (prefers-color-scheme: light) { :root {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--code-background: var(--light-code-background);
} }

@media (prefers-color-scheme: dark) { :root {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--code-background: var(--dark-code-background);
} }

:root[data-theme='light'] {
--hl-0: var(--light-hl-0);
--hl-1: var(--light-hl-1);
--hl-2: var(--light-hl-2);
--hl-3: var(--light-hl-3);
--hl-4: var(--light-hl-4);
--hl-5: var(--light-hl-5);
--hl-6: var(--light-hl-6);
--hl-7: var(--light-hl-7);
--hl-8: var(--light-hl-8);
--hl-9: var(--light-hl-9);
--code-background: var(--light-code-background);
}

:root[data-theme='dark'] {
--hl-0: var(--dark-hl-0);
--hl-1: var(--dark-hl-1);
--hl-2: var(--dark-hl-2);
--hl-3: var(--dark-hl-3);
--hl-4: var(--dark-hl-4);
--hl-5: var(--dark-hl-5);
--hl-6: var(--dark-hl-6);
--hl-7: var(--dark-hl-7);
--hl-8: var(--dark-hl-8);
--hl-9: var(--dark-hl-9);
--code-background: var(--dark-code-background);
}

.hl-0 { color: var(--hl-0); }
.hl-1 { color: var(--hl-1); }
.hl-2 { color: var(--hl-2); }
.hl-3 { color: var(--hl-3); }
.hl-4 { color: var(--hl-4); }
.hl-5 { color: var(--hl-5); }
.hl-6 { color: var(--hl-6); }
.hl-7 { color: var(--hl-7); }
.hl-8 { color: var(--hl-8); }
.hl-9 { color: var(--hl-9); }
pre, code { background: var(--code-background); }
18 changes: 18 additions & 0 deletions docs/modules/ROOT/attachments/api/typescript/assets/icons.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading