@@ -57,13 +57,27 @@ jobs:
5757
5858 # Method 1: Check using git diff with before/after SHAs
5959 if [ "${{ github.event.before }}" != "" ] && [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
60- echo "Comparing ${{ github.event.before }} with ${{ github.sha }}"
61- CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
62- echo "Changed files in this push:"
63- echo "$CHANGED_FILES"
64-
65- if echo "$CHANGED_FILES" | grep -q "web/src/locales/languages/en.json"; then
66- EN_JSON_CHANGED=true
60+ echo "Attempting to compare ${{ github.event.before }} with ${{ github.sha }}"
61+
62+ # Check if before commit exists (handles force push/rebase)
63+ if git cat-file -e ${{ github.event.before }} 2>/dev/null; then
64+ echo "Before commit exists, comparing..."
65+ CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
66+ echo "Changed files in this push:"
67+ echo "$CHANGED_FILES"
68+
69+ if echo "$CHANGED_FILES" | grep -q "web/src/locales/languages/en.json"; then
70+ EN_JSON_CHANGED=true
71+ fi
72+ else
73+ echo "⚠️ Before commit doesn't exist (force push/rebase), checking last commit..."
74+ CHANGED_FILES=$(git show --name-only --pretty="" HEAD)
75+ echo "Changed files in last commit:"
76+ echo "$CHANGED_FILES"
77+
78+ if echo "$CHANGED_FILES" | grep -q "web/src/locales/languages/en.json"; then
79+ EN_JSON_CHANGED=true
80+ fi
6781 fi
6882 else
6983 # Method 2: For first push or workflow_dispatch, check last commit