mirror of
https://gitea.com/gitea/docs.git
synced 2026-03-27 05:58:30 +07:00
Fix updating swagger failure caused by no content to change
This commit is contained in:
@@ -11,11 +11,18 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- run: |
|
||||
set -euo pipefail
|
||||
|
||||
make update-api-docs
|
||||
|
||||
git config --global user.name "Gitea Bot"
|
||||
git config --global user.email "teabot@gitea.io"
|
||||
git remote set-url origin https://x-access-token:${{ secrets.DEPLOY_TOKEN }}@gitea.com/gitea/docs.git
|
||||
git add --all
|
||||
git commit -m "[skip ci] Updated swagger files"
|
||||
git push
|
||||
|
||||
if git status --porcelain | grep -q .; then
|
||||
git add --all
|
||||
git commit -m "[skip ci] Updated swagger files"
|
||||
git push
|
||||
else
|
||||
echo "No API doc changes detected; skipping commit"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user