diff --git a/.gitea/workflows/auto-sort-files.yml b/.gitea/workflows/auto-sort-files.yml index 9195f40..bd11fc7 100644 --- a/.gitea/workflows/auto-sort-files.yml +++ b/.gitea/workflows/auto-sort-files.yml @@ -40,7 +40,8 @@ jobs: # Move file if it's not already in the correct location if [ "$src" != "$dest" ] && [ -f "$src" ]; then echo "Moving: $src -> $dest" - mv "$src" "$dest" + # Use git mv to preserve git tracking + git mv "$src" "$dest" return 0 # Success - file was moved fi return 1 # No file moved @@ -85,7 +86,7 @@ jobs: run: | git config --local user.email "${{ vars.WORKER_EMAIL }}" git config --local user.name "${{ vars.WORKER_USERNAME }}" - git add docs/datasheets/ docs/images/ + # git mv already stages the changes, so no need for git add git commit -m "Auto-sort: Move DS_ and IMG_ prefixed files to correct directories - Moved datasheet files (DS_*) to docs/datasheets/