From 04a4dd30c59dada99825881278326ed59d1095c2 Mon Sep 17 00:00:00 2001 From: Gilles Vink Date: Mon, 18 Dec 2023 22:00:18 +0100 Subject: [PATCH] Add check if there is new data and push if that is the case --- .github/workflows/test_and_deploy.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_and_deploy.yaml b/.github/workflows/test_and_deploy.yaml index 5798af7..442278b 100644 --- a/.github/workflows/test_and_deploy.yaml +++ b/.github/workflows/test_and_deploy.yaml @@ -52,7 +52,11 @@ jobs: git config user.email 'github-actions[bot]@users.noreply.github.com' git branch git pull - git commit -a -m "${{ github.event.head_commit.message }}" - git push - + if [[ -n $(git status -s) ]]; then + git commit -a -m "${{ github.event.head_commit.message }}" + git push + else + echo "No changes to commit." + fi + \ No newline at end of file