Repository navigation
86 lines (83 loc) · 3.13 KB
/
Copy pathdocs-checks.yml
File metadata and controls
86 lines (83 loc) · 3.13 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
name: Docs checks
on:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
docs-search:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run test:search
- run: npm run test:mcp
- run: npm run test:workshop
- run: npm run typecheck
- run: npm run test:rust-migration
# The required Vercel check runs npm run build, including search indexing.
social-cards:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
- run: npm ci --no-audit --no-fund
- run: npm run test:social-cards
- run: npm run test:optimize-images
- run: npm run test:llms
- run: npm run test:lens
# Supported Endpoints page: warn only for now, never fail the job.
- name: Check src/data/endpoints.js against the sidebar (warning only)
run: npm run test:endpoints || echo "::warning title=Supported Endpoints::src/data/endpoints.js is out of sync with the Supported Endpoints sidebar. See the test output above."
- name: Check src/data/endpoints.js against BerriAI/litellm (warning only)
run: npm run check:endpoints || echo "::warning title=Supported Endpoints::The upstream endpoints check could not run. See the output above."
- run: node --test scripts/docs-models.test.cjs
writing-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24
- run: node scripts/check-writing-style.js docs blog release_notes
structure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for retired master-key prefix
run: |
status=0
git grep -nI -F -- "sk-12""34" || status=$?
if [ "$status" -eq 0 ]; then
echo "Retired master-key prefix found"
exit 1
fi
if [ "$status" -ne 1 ]; then
exit "$status"
fi
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: pip install pyyaml
- run: python3 scripts/test_docs_models.py
- run: python3 scripts/test_check_docs_version_note.py
- run: python3 scripts/test_check_docs_author_person.py
- run: python3 scripts/test_lens_cli_dataset.py
- run: python3 scripts/check-docs.py docs
- name: Require a version badge on new pages and config settings
if: github.event_name == 'pull_request'
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
git fetch --no-tags --depth=1 origin "$BASE_SHA"
python3 scripts/check-docs.py docs --base="$BASE_SHA" --only=version-missing
- run: python3 scripts/check-docs.py blog release_notes --only=card-missing,card-too-long,author-person