fix: github action

only push if there are changes
This commit is contained in:
Aylur
2024-09-05 01:12:46 +02:00
parent c9c7ba4198
commit 539a6b4cc1
+5 -7
View File
@@ -49,14 +49,12 @@ jobs:
- name: Check for Changes
run: |
cd dist
git add .
if [ -n "$(git diff --cached)" ]; then
echo "No Changes Found"
exit 0
fi
- name: Push to Pages Repo
run: |
cd dist
git commit -m "Deployed from https://github.com/${{ github.repository }}/commit/${{ github.sha }}"
git push origin main
git add .
if [ -n "$(git diff --cached)" ]; then
git commit -m "Deployed from https://github.com/${{ github.repository }}/commit/${{ github.sha }}"
git push origin main
fi