diff --git a/.gitea/workflows/sync-github-mirror.yml b/.gitea/workflows/sync-github-mirror.yml index 41185c7..f0a9cba 100644 --- a/.gitea/workflows/sync-github-mirror.yml +++ b/.gitea/workflows/sync-github-mirror.yml @@ -53,14 +53,16 @@ jobs: # Mirror this checkout's tree into gh-mirror/ with the exclusions. # --delete drops files removed on the source; --exclude='.git' protects # both repos' .git dirs from rsync touching them. - # belt-and-suspenders exclude of the clone dir name in case anyone re-uses ./gh-mirror. + # NOTE: do NOT add an --exclude for the clone target dir name; rsync's --exclude also + # protects the matching path at the DESTINATION from --delete, which would prevent + # any stray copy of that dir from ever being cleaned up. The clone living in + # $RUNNER_TEMP (outside ./) already prevents the recursive self-include. rsync -a --delete \ --exclude='.git' \ --exclude='.gitea/' \ --exclude='.claude/' \ --exclude='blog/' \ --exclude='handoff.md' \ - --exclude='gh-mirror/' \ --exclude='__pycache__/' \ --exclude='*.pyc' \ --exclude='tasks.json' \