Documentation Deployment Guide
This guide explains how to build and deploy the neo4j-agent-memory documentation.
Local Development
Setup
# Install dependencies
cd docs
npm install
# Build documentation
npm run build
# Or use Makefile from project root
make docs-install
make docs
Deploying to Vercel
Option 1: Deploy from GitHub (Recommended)
-
Connect Repository to Vercel
-
Go to vercel.com and sign in
-
Click "Add New Project"
-
Import your GitHub repository
-
-
Configure Project Settings
-
Root Directory:
neo4j-agent-memory/docs -
Framework Preset: Other
-
Build Command:
npm run build -
Output Directory:
_site -
Install Command:
npm install
-
-
Deploy
-
Click "Deploy"
-
Vercel will automatically deploy on every push to main
-
Vercel Configuration
Custom Domain
To use a custom domain like docs.neo4j-agent-memory.dev:
-
Go to your Vercel project settings
-
Navigate to "Domains"
-
Add your custom domain
-
Configure DNS as instructed by Vercel
Environment Variables
No environment variables are required for the documentation build.
If you need to customize the build, you can set:
| Variable | Description | Default |
|---|---|---|
|
Base URL for the docs site |
|
|
Version shown in navigation |
Current version |
Application Environment Variables
When deploying applications using neo4j-agent-memory, you may need these environment variables:
| Variable | Description | Required |
|---|---|---|
|
Neo4j connection URI |
Yes |
|
Neo4j username |
Yes |
|
Neo4j password |
Yes |
|
OpenAI API key (for embeddings/LLM) |
Recommended |
|
Opik API key (for observability) |
Optional |
|
OpenTelemetry endpoint |
Optional |
See Configuration Reference for all available settings.
Automatic Deployments
With GitHub integration, Vercel automatically:
-
Production Deploy: On push to
mainbranch -
Preview Deploy: On pull requests
Each PR gets a unique preview URL for reviewing documentation changes.
Troubleshooting
Build Fails
-
Check Node.js version (requires 18+)
node --version -
Clear node_modules and reinstall
rm -rf node_modules package-lock.json npm install -
Test build locally
npm run build
CI/CD Integration
GitHub Actions
Add to .github/workflows/docs.yml:
name: Deploy Docs
on:
push:
branches: [main]
paths:
- 'neo4j-agent-memory/docs/**'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install and Build
working-directory: neo4j-agent-memory/docs
run: |
npm ci
npm run build
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: neo4j-agent-memory/docs
vercel-args: '--prod'
Required secrets:
-
VERCEL_TOKEN: From Vercel account settings -
VERCEL_ORG_ID: From.vercel/project.jsonaftervercel link -
VERCEL_PROJECT_ID: From.vercel/project.jsonaftervercel link