prevent model weights from bloating repository

This commit is contained in:
haixin.yang
2026-07-23 13:52:57 +08:00
parent c02e6136a1
commit a0892e5367
2 changed files with 22 additions and 0 deletions
+19
View File
@@ -14,6 +14,25 @@ jobs:
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Guard repository size
shell: bash
run: |
if [[ -n "$(git ls-files 'public/models/**')" ]]; then
echo "::error::AI model weights must be hosted externally, not committed under public/models/."
git ls-files 'public/models/**'
exit 1
fi
max_bytes=$((20 * 1024 * 1024))
failed=0
while IFS= read -r -d '' file; do
size=$(stat --format=%s "$file")
if (( size > max_bytes )); then
echo "::error file=$file::Tracked file exceeds the 20 MiB repository limit."
failed=1
fi
done < <(git ls-files -z)
exit "$failed"
- uses: actions/setup-node@v4
with:
node-version: 22
+3
View File
@@ -8,6 +8,9 @@ test-results/
playwright-report/
blob-report/
# AI model weights are hosted externally and downloaded at runtime
public/models/
# local QA captures and generated media
qa/
design-qa.md