Skip to content

Commit

Permalink
modified: .github/workflows/recent-posts.yml
Browse files Browse the repository at this point in the history
	- Added conditional to check if README.md has been modified. Add and commit the file if it has, otherwise exit.
  • Loading branch information
it176131 committed Jan 10, 2025
1 parent d1b6d58 commit 85f78b0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/recent-posts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
run: |
git config user.email [email protected]
git config user.name github-actions
git add README.md
git commit -m "Synced and updated with most recent it176131.github.io blog post"
git push
has_diff=$(git diff main --name-only -- README.md)
if [ $has_diff ]; then
git add README.md
git commit -m "Synced and updated with most recent it176131.github.io blog post"
git push
fi

0 comments on commit 85f78b0

Please sign in to comment.