Files
gitea-docs/.gitea/workflows/update_swagger.yaml
Renovate Bot c9216685d5 chore(deps): update actions/checkout action to v7 (#445)
Reviewed-on: https://gitea.com/gitea/docs/pulls/445
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Co-committed-by: Renovate Bot <renovate-bot@gitea.com>
2026-06-23 00:05:55 +00:00

29 lines
772 B
YAML

name: update swagger files
on:
schedule:
- cron: '0 */12 * * *' # every 12 hours on the hour
workflow_dispatch:
jobs:
update-swagger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- 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
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