File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 - " frontend/**"
88 - " scripts/export_frontend.sh"
99 - " src/hyperview/server/static/**"
10+ push :
11+ paths :
12+ - " frontend/**"
13+ - " scripts/export_frontend.sh"
14+ - " src/hyperview/server/static/**"
1015
1116jobs :
1217 require-frontend-export :
@@ -17,14 +22,25 @@ jobs:
1722 uses : actions/checkout@v4
1823 with :
1924 fetch-depth : 0
20- ref : ${{ github.event.pull_request.head.sha }}
2125
2226 - name : Verify static export updated when frontend changes
2327 run : |
2428 set -euo pipefail
2529
26- base_sha="${{ github.event.pull_request.base.sha }}"
27- head_sha="${{ github.event.pull_request.head.sha }}"
30+ # Determine base and head SHAs based on event type
31+ if [[ "${{ github.event_name }}" == "pull_request" ]]; then
32+ base_sha="${{ github.event.pull_request.base.sha }}"
33+ head_sha="${{ github.event.pull_request.head.sha }}"
34+ else
35+ # For push events, compare with the previous commit
36+ head_sha="${{ github.sha }}"
37+ base_sha="${{ github.event.before }}"
38+ # Handle initial push (no previous commit)
39+ if [[ "$base_sha" == "0000000000000000000000000000000000000000" ]]; then
40+ echo "Initial push - skipping check"
41+ exit 0
42+ fi
43+ fi
2844
2945 changed_files="$(git diff --name-only "$base_sha" "$head_sha")"
3046
You can’t perform that action at this time.
0 commit comments