Repository navigation
121 lines (110 loc) · 4.23 KB
/
Copy pathdocs.yml
File metadata and controls
121 lines (110 loc) · 4.23 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Documentation
on:
push:
branches: [main]
paths:
- '.github/workflows/ci.yml'
- '.github/workflows/docs.yml'
- '.github/workflows/release.yml'
- 'apps/docs/**'
- 'apps/ios/project.yml'
- 'apps/ios/ServerBee/ViewModels/AgentLifecycleViewModel.swift'
- 'apps/web/src/components/server/*enrollment-dialog.tsx'
- 'apps/web/src/components/server/add-server-dialog.tsx'
- 'Cargo.toml'
- 'crates/common/src/constants.rs'
- 'crates/server/src/config.rs'
- 'crates/server/src/router/api/brand.rs'
- 'crates/server/src/router/api/setting.rs'
- 'crates/server/src/router/api/mobile_push.rs'
- 'apps/push-relay/README.md'
- 'crates/server/src/service/geoip.rs'
- 'crates/server/src/service/asn.rs'
- 'deploy/install.sh'
- 'deploy/railway/Dockerfile'
- 'deploy/railway/README.md'
# scripts/check-contracts.ts checks that the configuration pages document every variable ENV.md lists.
- 'ENV.md'
# The docs dependencies, and patches/fumadocs-ui@16.6.16.patch, which translates its labels.
- 'bun.lock'
- 'package.json'
- 'patches/**'
- 'tests/manual/docs-scroll-restoration.md'
pull_request:
branches: [main]
paths:
- '.github/workflows/ci.yml'
- '.github/workflows/docs.yml'
- '.github/workflows/release.yml'
- 'apps/docs/**'
- 'apps/ios/project.yml'
- 'apps/ios/ServerBee/ViewModels/AgentLifecycleViewModel.swift'
- 'apps/web/src/components/server/*enrollment-dialog.tsx'
- 'apps/web/src/components/server/add-server-dialog.tsx'
- 'Cargo.toml'
- 'crates/common/src/constants.rs'
- 'crates/server/src/config.rs'
- 'crates/server/src/router/api/brand.rs'
- 'crates/server/src/router/api/setting.rs'
- 'crates/server/src/router/api/mobile_push.rs'
- 'apps/push-relay/README.md'
- 'crates/server/src/service/geoip.rs'
- 'crates/server/src/service/asn.rs'
- 'deploy/install.sh'
- 'deploy/railway/Dockerfile'
- 'deploy/railway/README.md'
# scripts/check-contracts.ts checks that the configuration pages document every variable ENV.md lists.
- 'ENV.md'
# The docs dependencies, and patches/fumadocs-ui@16.6.16.patch, which translates its labels.
- 'bun.lock'
- 'package.json'
- 'patches/**'
- 'tests/manual/docs-scroll-restoration.md'
concurrency:
group: docs-${{ github.ref }}
cancel-in-progress: true
jobs:
docs:
name: Build, route, and browser contracts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Match the generated Vercel function runtime and the local production preview.
- uses: actions/setup-node@v7
with:
node-version: 24
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Type check
working-directory: apps/docs
run: bun run types:check
- name: Check documentation contracts
working-directory: apps/docs
run: bun run check:contracts
- name: Validate published Compose examples
shell: bash
run: |
for locale in en zh; do
awk '/^## Docker Compose/{section=1} section && /^```yaml/{block=1; next} block && /^```/{exit} block{print}' \
"apps/docs/content/docs/${locale}/deployment.mdx" \
| docker compose -f - config --quiet
done
- name: Build production documentation
working-directory: apps/docs
run: bun run build
- name: Install browser
working-directory: apps/docs
run: bun x playwright install --with-deps chromium
- name: Check production routes and browser navigation
working-directory: apps/docs
shell: bash
run: |
node scripts/start-production.ts > /tmp/serverbee-docs.log 2>&1 &
docs_pid=$!
trap 'kill "$docs_pid" 2>/dev/null || true' EXIT
SERVERBEE_DOCS_BASE_URL=http://127.0.0.1:4000 bun run check:routes
BASE_URL=http://127.0.0.1:4000 bun run check:browser
- name: Show preview log on failure
if: failure()
run: cat /tmp/serverbee-docs.log 2>/dev/null || true