prevent model weights from bloating repository
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user