mirror of
https://github.com/tiennm99/blog.git
synced 2026-10-11 03:13:10 +00:00
fix(ci): handle clean index after git add in projects workflow
This commit is contained in:
1 parent
8531e1f962
commit
f4a533db31
1 file changed
+4
-4
@@ -38,12 +38,12 @@ jobs:
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
if [[ -z "$(git status --porcelain content/page/projects/index.md)" ]]; then
|
||||
echo "No changes to commit."
|
||||
exit 0
|
||||
fi
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add content/page/projects/index.md
|
||||
if git diff --cached --quiet; then
|
||||
echo "No changes to commit."
|
||||
exit 0
|
||||
fi
|
||||
git commit -m "chore(projects): refresh projects list"
|
||||
git push
|
||||
Reference in new issue
Block a user