diff --git a/.gitea/workflows/validate-docs.yml b/.gitea/workflows/validate-docs.yml new file mode 100644 index 0000000..68d5a28 --- /dev/null +++ b/.gitea/workflows/validate-docs.yml @@ -0,0 +1,36 @@ +name: validate-docs + +on: + push: + branches: + - main + pull_request: + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Show repository files + run: | + echo "检查 AI球协议文档仓库结构" + find . -maxdepth 3 -type f | sort + + - name: Validate JSON schemas + run: | + python3 -m json.tool schemas/call_script_schema.json > /tmp/call_script_schema_checked.json + python3 -m json.tool schemas/resource_pack_schema.json > /tmp/resource_pack_schema_checked.json + echo "JSON schema 格式检查通过" + + - name: Check required docs + run: | + test -f docs/architecture.md + test -f docs/state_machine.md + test -f docs/device_api.md + test -f docs/concert_sync_protocol.md + test -f docs/factory_test_spec.md + test -f schemas/call_script_schema.json + test -f schemas/resource_pack_schema.json + echo "AI球协议文档基础文件齐全"