-
Notifications
You must be signed in to change notification settings - Fork 17
84 lines (70 loc) · 2.19 KB
/
Copy pathagent-docs.yml
File metadata and controls
84 lines (70 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Agent-Friendly Docs
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: agent-docs-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
agent-docs:
runs-on: ubuntu-latest
timeout-minutes: 20
env:
INTERNAL_CONTENT_API_KEY: ci-agent-docs
NEXT_PUBLIC_APP_URL: http://localhost:3000
NEXT_PUBLIC_CONVEX_SITE_URL: https://dapper-antelope-269.convex.site
NEXT_PUBLIC_CONVEX_URL: https://dapper-antelope-269.convex.cloud
NEXT_PUBLIC_MCP_URL: https://mcp.nakafa.com
NEXT_PUBLIC_POSTHOG_KEY: phc_agent_docs_ci
NEXT_PUBLIC_POSTHOG_UI_HOST: https://eu.posthog.com
POSTHOG_PROXY_HOST: https://t.nakafa.com
SITE_URL: http://localhost:3000
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 24
cache: "pnpm"
- name: Setup uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-dependency-glob: apps/cas/uv.lock
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Export app version
run: |
echo "NEXT_PUBLIC_VERSION=$(node -p 'require(\"./package.json\").version')" >> "$GITHUB_ENV"
- name: Build production app
run: pnpm build
- name: Start web app
run: |
pnpm --filter www start > /tmp/nakafa-www.log 2>&1 &
echo "$!" > /tmp/nakafa-www.pid
- name: Wait for web app
run: |
for attempt in {1..60}; do
if curl -fsS http://localhost:3000/llms.txt > /dev/null; then
exit 0
fi
sleep 2
done
cat /tmp/nakafa-www.log
exit 1
- name: Run AFDocs checks
run: pnpm agent-docs
- name: Stop web app
if: always()
run: |
if [ -f /tmp/nakafa-www.pid ]; then
kill "$(cat /tmp/nakafa-www.pid)" || true
fi