Skip to content

Commit

Permalink
only try and commit to git when there are changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jul 10, 2024
1 parent df6f8ca commit 7bf6984
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/index-recipes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ jobs:
run: |
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs/recipes/index.json docs/recipes/README.md
git commit -m "Update recipes index and README"
git push origin $BRANCH_NAME
git config --local user.name "Lucee Docs GitHub Action"
if [ -n "$(git status --porcelain)" ];
git add docs/recipes/index.json docs/recipes/README.md
git commit -m "Update recipes index and README"
git push origin $BRANCH_NAME
else
echo "No changes found"
fi

0 comments on commit 7bf6984

Please sign in to comment.