Skip to content

docs: 相关项目表描述统一,与 superpowers-zh 对齐 #2

docs: 相关项目表描述统一,与 superpowers-zh 对齐

docs: 相关项目表描述统一,与 superpowers-zh 对齐 #2

Workflow file for this run

name: Link & Bilingual Check
on:
push:
branches: [main]
paths:
- '**.md'
pull_request:
paths:
- '**.md'
schedule:
# 每周一 UTC 03:00 跑一次,捕捉外部链接 rot
- cron: '0 3 * * 1'
workflow_dispatch:
jobs:
link-check:
name: Check Markdown Links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run lychee
uses: lycheeverse/lychee-action@v2
with:
args: >-
--config .lychee.toml
--no-progress
--verbose
'./**/*.md'
fail: true
token: ${{ secrets.GITHUB_TOKEN }}
bilingual-parity:
name: Check Bilingual Parity
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Verify every .md has .en.md and vice versa
run: |
set -e
missing=0
# .md 没对应 .en.md
while IFS= read -r -d '' file; do
# 跳过不需要双语的文件:模板、license 等
case "$file" in
*.en.md) continue;;
./node_modules/*) continue;;
./LICENSE*) continue;;
*/templates/*) continue;; # 配置模板是项目专属,不翻译
esac
en="${file%.md}.en.md"
if [ ! -f "$en" ]; then
echo "❌ 缺英文对照: $file → $en"
missing=$((missing+1))
fi
done < <(find . -name "*.md" -not -path "./.git/*" -print0)
# .en.md 没对应 .md
while IFS= read -r -d '' file; do
case "$file" in
./node_modules/*) continue;;
*/templates/*) continue;;
esac
zh="${file%.en.md}.md"
if [ ! -f "$zh" ]; then
echo "❌ 缺中文对照: $file → $zh"
missing=$((missing+1))
fi
done < <(find . -name "*.en.md" -not -path "./.git/*" -print0)
if [ "$missing" -gt 0 ]; then
echo ""
echo "共 $missing 个文件缺双语对照。"
echo "修复:每个 xxx.md 都要有配套的 xxx.en.md(反之亦然)。"
exit 1
fi
echo "✅ 所有 Markdown 文件双语对照完整"