diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 842ceaa..f373ca1 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -21,12 +21,24 @@ jobs: - name: Submodule run: sh update.sh - + + - name: Check for changes + id: check_changes + run: | + if git diff --quiet; then + echo "No changes detected" + echo "::set-output name=push_required::false" + else + echo "Changes detected" + echo "::set-output name=push_required::true" + fi + - name: Deploy + if: steps.check_changes.outputs.push_required == 'true' run: | git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@github.com" git add --all git commit -m "$(date +'%Y-%m-%dT%H:%M:%S')" git push - \ No newline at end of file +