diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 63eaf1197..688583eb6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -21,7 +21,8 @@ permissions: contents: read jobs: - validate: + validate-mkdocs: + name: Validate mkdocs build if: github.event_name == 'pull_request' runs-on: ubuntu-latest timeout-minutes: 10 @@ -46,7 +47,31 @@ jobs: - name: Build docs run: mkdocs build - deploy: + validate-nextjs: + name: Validate Next.js build + if: github.event_name == 'pull_request' + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '20' + cache: npm + cache-dependency-path: docs/package-lock.json + + - name: Install dependencies + run: npm ci + working-directory: docs + + - name: Build docs + run: npm run build + working-directory: docs + + deploy-github-pages: + name: Deploy GitHub Pages if: github.event_name != 'pull_request' runs-on: ubuntu-latest permissions: @@ -73,3 +98,33 @@ jobs: - name: Build and deploy run: mkdocs gh-deploy --force + + deploy-vercel: + name: Deploy Vercel Docs + if: >- + github.event_name != 'pull_request' + && github.ref == 'refs/heads/main' + && github.repository_owner == 'headroomlabs-ai' + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v6 + + - name: Setup Node.js + uses: actions/setup-node@v6 + with: + node-version: '20' + cache: npm + cache-dependency-path: docs/package-lock.json + + - name: Install dependencies + run: npm ci + working-directory: docs + + - name: Deploy to Vercel + run: npx vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }} + working-directory: docs + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} diff --git a/docs/package-lock.json b/docs/package-lock.json index d9bb81710..3d1ef45e0 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -18,7 +18,6 @@ "fumadocs-twoslash": "^3.1.3", "fumadocs-typescript": "^4.0.3", "fumadocs-ui": "16.10.3", - "headroom-ai": "file:../sdk/typescript", "lucide-react": "^1.7.0", "next": "16.2.6", "react": "^19.2.4", @@ -41,46 +40,6 @@ "typescript": "^5.9.3" } }, - "../sdk/typescript": { - "name": "headroom-ai", - "version": "0.27.0", - "license": "Apache-2.0", - "devDependencies": { - "@ai-sdk/anthropic": "^3.0.64", - "@ai-sdk/openai": "^3.0.48", - "@ai-sdk/provider": "^1.0.0", - "@anthropic-ai/sdk": "^0.104.1", - "ai": "^6.0.0", - "dotenv": "^17.3.1", - "openai": "^4.80.0", - "tsup": "^8.0.0", - "typescript": "^5.5.0", - "vitest": "^4.1.5" - }, - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "@ai-sdk/provider": ">=1.0.0", - "@anthropic-ai/sdk": ">=0.30.0", - "ai": ">=6.0.0", - "openai": ">=4.0.0" - }, - "peerDependenciesMeta": { - "@ai-sdk/provider": { - "optional": true - }, - "@anthropic-ai/sdk": { - "optional": true - }, - "ai": { - "optional": true - }, - "openai": { - "optional": true - } - } - }, "node_modules/@ai-sdk/gateway": { "version": "3.0.91", "dev": true, @@ -2363,7 +2322,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2380,7 +2338,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2397,7 +2354,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2414,7 +2370,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2431,7 +2386,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2446,7 +2400,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2461,7 +2414,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2478,7 +2430,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2495,7 +2446,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2520,7 +2470,6 @@ "cpu": [ "wasm32" ], - "dev": true, "license": "MIT", "optional": true, "dependencies": { @@ -2537,7 +2486,6 @@ }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/core": { "version": "1.8.1", - "dev": true, "inBundle": true, "license": "MIT", "optional": true, @@ -2548,7 +2496,6 @@ }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/runtime": { "version": "1.8.1", - "dev": true, "inBundle": true, "license": "MIT", "optional": true, @@ -2558,7 +2505,6 @@ }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@emnapi/wasi-threads": { "version": "1.1.0", - "dev": true, "inBundle": true, "license": "MIT", "optional": true, @@ -2568,7 +2514,6 @@ }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { "version": "1.1.1", - "dev": true, "inBundle": true, "license": "MIT", "optional": true, @@ -2584,7 +2529,6 @@ }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/@tybys/wasm-util": { "version": "0.10.1", - "dev": true, "inBundle": true, "license": "MIT", "optional": true, @@ -2594,7 +2538,6 @@ }, "node_modules/@tailwindcss/oxide-wasm32-wasi/node_modules/tslib": { "version": "2.8.1", - "dev": true, "inBundle": true, "license": "0BSD", "optional": true @@ -2606,7 +2549,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -2623,7 +2565,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MIT", "optional": true, "os": [ @@ -3946,10 +3887,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/headroom-ai": { - "resolved": "../sdk/typescript", - "link": true - }, "node_modules/html-void-elements": { "version": "3.0.0", "license": "MIT", diff --git a/docs/package.json b/docs/package.json index c0fe2bf38..824a6cf16 100644 --- a/docs/package.json +++ b/docs/package.json @@ -19,7 +19,6 @@ "fumadocs-twoslash": "^3.1.3", "fumadocs-typescript": "^4.0.3", "fumadocs-ui": "16.10.3", - "headroom-ai": "file:../sdk/typescript", "lucide-react": "^1.7.0", "next": "16.2.6", "react": "^19.2.4", diff --git a/docs/vercel.json b/docs/vercel.json new file mode 100644 index 000000000..5ede4b869 --- /dev/null +++ b/docs/vercel.json @@ -0,0 +1,6 @@ +{ + "framework": "nextjs", + "buildCommand": "next build", + "outputDirectory": ".next", + "installCommand": "npm install" +}