From 2d7e9a23820194e3a95b0ade2a2f27dc6702ceef Mon Sep 17 00:00:00 2001 From: xyzroe Date: Wed, 12 Jun 2024 18:16:36 +0200 Subject: [PATCH] fix error, if no changes --- .github/workflows/update_devices.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/update_devices.yml b/.github/workflows/update_devices.yml index 38ef436..154aef8 100644 --- a/.github/workflows/update_devices.yml +++ b/.github/workflows/update_devices.yml @@ -2,7 +2,7 @@ name: Update devices in wiki permissions: contents: write - + on: workflow_dispatch: push: @@ -45,6 +45,10 @@ jobs: cd mkdocs_branch git config --global user.name 'github-actions' git config --global user.email 'github-actions@github.com' - git add docs/features.md - git commit -m 'Update features.md with new device data' - git push origin mkdocs + if [[ -n $(git status --porcelain) ]]; then + git add docs/features.md + git commit -m 'Update features.md with new device data' + git push origin mkdocs + else + echo "No changes to commit" + fi