diff --git a/src/devx/ci/push_badges.py b/src/devx/ci/push_badges.py index 1cb8205..e2d3d9b 100644 --- a/src/devx/ci/push_badges.py +++ b/src/devx/ci/push_badges.py @@ -93,8 +93,8 @@ def push_to_badges_branch(badges_dir: str) -> str: _run(["git", "config", "user.email", "actions@oblachno.fyi"]) # nosec B607 _run(["git", "checkout", "--orphan", "badges"]) # nosec B607 _run(["git", "rm", "-rf", "."]) # nosec B607 - # Remove untracked files/dirs left behind (e.g. .badges/ from generate_badges) - _run(["git", "clean", "-fdx", "-e", ".git"]) # nosec B607 + # Remove untracked files/dirs left behind, but preserve .badges/ for copy below + _run(["git", "clean", "-fdx", "-e", ".git", "-e", badges_dir]) # nosec B607 # Copy badge files to root for svg in Path(badges_dir).glob("*.svg"):