-
Notifications
You must be signed in to change notification settings - Fork 6
50 lines (47 loc) · 1.85 KB
/
Copy pathdocs.yml
File metadata and controls
50 lines (47 loc) · 1.85 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
name: docs
on:
push:
branches: [main]
pull_request:
jobs:
sync:
name: EN/zh sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: AGENTS.md / AGENTS.zh-CN.md parity
run: |
en=$(wc -l < AGENTS.md); zh=$(wc -l < AGENTS.zh-CN.md)
if [ "$en" -ne "$zh" ]; then
echo "Line count drift: AGENTS.md=$en AGENTS.zh-CN.md=$zh"; exit 1
fi
v_en=$(head -1 AGENTS.md | grep -o 'v[0-9][0-9.]*')
v_zh=$(head -1 AGENTS.zh-CN.md | grep -o 'v[0-9][0-9.]*')
if [ "$v_en" != "$v_zh" ]; then
echo "Version marker drift: AGENTS.md=$v_en AGENTS.zh-CN.md=$v_zh"; exit 1
fi
echo "AGENTS pair OK: $en lines, $v_en"
- name: README heading parity
run: |
if ! diff <(grep -n '^#' README.md | cut -d: -f1) <(grep -n '^#' README.zh-CN.md | cut -d: -f1); then
echo "README heading structure drift between languages"; exit 1
fi
echo "README headings aligned"
links:
name: link check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: lycheeverse/lychee-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Version-pinned raw URLs are excluded so docs can reference a tag
# in the same change that introduces it; shields/star-history are
# dynamic badge services that rate-limit checkers; addyosmani.com
# drops connections from CI runner IPs (verified alive manually).
args: >-
--no-progress
--exclude 'img\.shields\.io|star-history\.com|raw\.githubusercontent\.com/yeasy/agentgo/v[0-9]|github\.com/yeasy/AgentGo/security|addyosmani\.com'
README.md README.zh-CN.md AGENTS.md AGENTS.zh-CN.md CONTRIBUTING.md SECURITY.md
fail: true