-
Notifications
You must be signed in to change notification settings - Fork 3
100 lines (83 loc) · 2.93 KB
/
Copy pathdocs-quality.yml
File metadata and controls
100 lines (83 loc) · 2.93 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
name: Docs Quality
on:
push:
paths:
- "docs/starlight/**"
- "openapi/**"
pull_request:
branches: [ master, develop ]
paths:
- "docs/starlight/**"
- "openapi/**"
permissions:
contents: read
env:
NODE_VERSION: "22.13.0"
jobs:
openapi-lint:
name: OpenAPI Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Lint OpenAPI specs
run: npx @redocly/cli lint --config redocly.yaml gateway@v1 scim@v1 federation@v1 vc@v1
docs-build:
name: Docs Build Check
runs-on: ubuntu-latest
needs: [openapi-lint]
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: npm ci
working-directory: docs/starlight
- name: Copy OpenAPI specs
run: |
mkdir -p docs/starlight/public/openapi
cp openapi/v1/*.yaml docs/starlight/public/openapi/
- name: Build docs
run: npm run build
working-directory: docs/starlight
- name: Validate required docs files exist
run: |
python3 - <<'PY'
import sys
from pathlib import Path
required = [
"docs/starlight/src/content/docs/index.mdx",
"docs/starlight/src/content/docs/start-here/overview.mdx",
"docs/starlight/src/content/docs/start-here/quickstart.mdx",
"docs/starlight/src/content/docs/api/overview.mdx",
"docs/starlight/src/content/docs/developers/overview.mdx",
"docs/starlight/src/content/docs/developers/development-setup.mdx",
"docs/starlight/src/content/docs/developers/pull-request-workflow.mdx",
"docs/starlight/src/content/docs/developers/extending/add-a-protocol.mdx",
"docs/starlight/src/content/docs/deploy/overview.mdx",
"docs/starlight/src/content/docs/protocols/oauth2.mdx",
"docs/starlight/src/content/docs/protocols/oidc.mdx",
"docs/starlight/src/content/docs/protocols/saml.mdx",
"docs/starlight/src/content/docs/protocols/scim.mdx",
"docs/starlight/src/pages/api/reference.astro",
"docs/starlight/src/layouts/ApiReference.astro",
"openapi/v1/gateway.yaml",
"openapi/v1/scim.yaml",
"openapi/v1/federation.yaml",
"openapi/v1/vc.yaml",
]
missing = [p for p in required if not Path(p).exists()]
if missing:
print("Required docs files missing:")
for p in missing:
print(f" - {p}")
sys.exit(1)
print(f"All {len(required)} required docs files present.")
PY