Skip to content

Commit 9785a4a

Browse files
author
Gunther Klessinger
committed
debug badge
1 parent e64ad2e commit 9785a4a

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,12 @@ jobs:
9595
run: uv sync
9696

9797
- name: Build documentation
98-
run: just docs
98+
run: |
99+
just docs
100+
# Ensure badge files are in the site directory
101+
mkdir -p ./site/img
102+
cp docs/img/badge_*.svg ./site/img/ 2>/dev/null || true
103+
ls -la ./site/img/
99104
100105
- name: Deploy to GitHub Pages
101106
uses: peaceiris/actions-gh-pages@v4
@@ -161,3 +166,12 @@ jobs:
161166
# Create a simple coverage badge URL for README
162167
echo "Add this to your README:"
163168
echo "[![Coverage](https://img.shields.io/badge/coverage-${COVERAGE}%25-${COLOR})](https://github.com/axiros/docutools/actions/workflows/ci.yml)"
169+
170+
- name: Commit coverage files
171+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
172+
run: |
173+
git config --local user.email "action@github.com"
174+
git config --local user.name "GitHub Action"
175+
git add -f coverage.xml coverage_report.txt || true
176+
git diff --staged --quiet || git commit -m "Update coverage reports" || true
177+
git push || true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[gh-ci]: https://github.com/axiros/docutools/actions/workflows/ci.yml
99
[gh-ci_img]: https://github.com/axiros/docutools/actions/workflows/ci.yml/badge.svg
1010
[coverage]: https://github.com/axiros/docutools/actions/workflows/ci.yml
11-
[coverage_img]: https://img.shields.io/badge/dynamic/xml?color=brightgreen&label=coverage&query=%2F%2F%40line-rate&suffix=%25&url=https%3A%2F%2Fraw.githubusercontent.com%2Faxiros%2Fdocutools%2Fmain%2Fcoverage.xml
11+
[coverage_img]: https://img.shields.io/github/actions/workflow/status/axiros/docutools/ci.yml?label=coverage&logo=codecov
1212
[pkg]: https://pypi.org/project/docutools/2022.04.11/
1313
[pkg_img]: https://axiros.github.io/docutools/img/badge_pypi.svg
1414
[code_style]: https://github.com/astral-sh/ruff

0 commit comments

Comments
 (0)