Add check that it is gh-pages branch

This commit is contained in:
Vasilii Rogin
2025-06-02 20:53:30 +03:00
parent 224f1088f2
commit ad776876a1
@@ -29,6 +29,15 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo "Current branch: $CURRENT_BRANCH"
if [ "$CURRENT_BRANCH" != "gh-pages" ]; then
echo "❌ Refusing to force-push to non-gh-pages branch: $CURRENT_BRANCH"
exit 1
fi
if git diff --cached --quiet; then
echo "No changes to commit"
else