Skip to content

Commit a8fd1f1

Browse files
committed
Add Diataxis documentation structure and Vercel deployment
- Add acp-spec as git submodule for documentation source - Create sync-docs.ts build script for MD→MDX conversion - Generate docs from acp-spec/acp-docs at build time - Add GitHub Actions workflow for Vercel deployment - Update sidebar with logo and theme switcher - Restructure navigation following Diataxis principles - Remove static docs content (now generated from submodule)
1 parent f89c51c commit a8fd1f1

37 files changed

+1352
-12147
lines changed

.github/workflows/deploy.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Deploy to Vercel
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
11+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
submodules: recursive
20+
21+
- uses: pnpm/action-setup@v4
22+
with:
23+
version: 10.24.0
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: "22"
28+
cache: "pnpm"
29+
30+
- name: Install dependencies
31+
run: pnpm install --frozen-lockfile
32+
33+
- name: TypeScript check
34+
run: pnpm typecheck
35+
36+
- name: Lint
37+
run: pnpm lint
38+
39+
- name: Install Vercel CLI
40+
run: pnpm add -g vercel@latest
41+
42+
- name: Pull Vercel Environment
43+
run: vercel pull --yes --environment=${{ github.ref == 'refs/heads/main' && 'production' || 'preview' }} --token=${{ secrets.VERCEL_TOKEN }}
44+
45+
- name: Build Project
46+
run: vercel build ${{ github.ref == 'refs/heads/main' && '--prod' || '' }} --token=${{ secrets.VERCEL_TOKEN }}
47+
48+
- name: Deploy to Vercel
49+
id: deploy
50+
run: |
51+
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
52+
vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} > deployment-url.txt
53+
else
54+
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > deployment-url.txt
55+
fi
56+
echo "url=$(cat deployment-url.txt)" >> $GITHUB_OUTPUT
57+
58+
- name: Comment PR with Preview URL
59+
if: github.event_name == 'pull_request'
60+
uses: actions/github-script@v7
61+
with:
62+
script: |
63+
github.rest.issues.createComment({
64+
issue_number: context.issue.number,
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
body: `Preview deployed to: ${{ steps.deploy.outputs.url }}`
68+
})

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ dist/
99
build/
1010
.turbo/
1111

12+
# Generated documentation (synced from acp-spec)
13+
apps/web/content/docs/
14+
1215
# Cache
1316
*.tsbuildinfo
1417
.eslintcache

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "acp-spec"]
2+
path = acp-spec
3+
url = https://github.com/acp-protocol/acp-spec.git

acp-spec

Submodule acp-spec added at de47bdc

apps/web/content/docs/api-reference/_meta.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)