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