-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathlefthook.yml
More file actions
19 lines (19 loc) · 657 Bytes
/
Copy pathlefthook.yml
File metadata and controls
19 lines (19 loc) · 657 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pre-push:
commands:
dashboard-build:
tags: build
env:
CI: "1"
run: |
exec </dev/null
# Auto-rebuild dashboard if source changed but dist is stale
changed=$(git diff --name-only origin/main...HEAD -- dashboard/src/ dashboard/shared/ dashboard/index.html)
if [ -n "$changed" ]; then
echo "⚙ Dashboard source changed, rebuilding..."
cd dashboard && npm run build
cd ..
git add dashboard/dist/
# Amend the commit with rebuilt dist
git commit --amend --no-edit
echo "✓ Dashboard rebuilt and amended into commit."
fi