File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,12 +26,28 @@ jobs:
2626 run : |
2727 set -euo pipefail
2828 mkdir -p site/auxiliary
29+ mkdir -p site/metrics
2930 curl -L --fail \
3031 -o site/auxiliary/nabla-glow.svg \
3132 https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests/releases/download/pages-assets/nabla-glow.svg
3233 curl -L --fail \
3334 -o site/auxiliary/externaldata-flow-kitware.jpg \
3435 https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests/releases/download/pages-assets/externaldata-flow-kitware.jpg
36+ git clone --quiet https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests.git repo-size-check
37+ python - <<'PY'
38+ import json
39+ from pathlib import Path
40+ pack_dir = Path("repo-size-check/.git/objects/pack")
41+ total = sum(path.stat().st_size for path in pack_dir.glob("*"))
42+ kib = (total + 1023) // 1024
43+ payload = {
44+ "schemaVersion": 1,
45+ "label": "repo size",
46+ "message": f"{kib} KiB",
47+ "color": "blue",
48+ }
49+ Path("site/metrics/repo-size.json").write_text(json.dumps(payload), encoding="utf-8")
50+ PY
3551 printf '%s\n' '<!doctype html><meta charset="utf-8"><title>Nabla Asset Manifests Pages</title>' > site/index.html
3652 touch site/.nojekyll
3753
Original file line number Diff line number Diff line change 66 <a href =" https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests/actions/workflows/smoke.yml " >
77 <img src="https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests/actions/workflows/smoke.yml/badge.svg" alt="Smoke Status" /></a>
88 <a href =" https://github.com/Devsh-Graphics-Programming/Nabla-Asset-Manifests " >
9- <img src="https://img.shields.io/github/repo-size/Devsh-Graphics-Programming/Nabla- Asset-Manifests?label=repo%20size " alt="Repository size" /></a>
9+ <img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fdevsh-graphics-programming.github.io%2FNabla- Asset-Manifests%2Fmetrics%2Frepo-size.json " alt="Repository size" /></a>
1010 <a href =" https://opensource.org/licenses/Apache-2.0 " >
1111 <img src="https://img.shields.io/badge/license-Apache%202.0-blue" alt="License: Apache 2.0" /></a>
1212 <a href =" https://discord.gg/krsBcABm7u " >
You can’t perform that action at this time.
0 commit comments