repo-file-sync-action
repo-file-sync-action copied to clipboard
deleteOrphaned seems to have no effect
🐞 Describe the bug
Despite the inclusion of deleteOrphaned: true in .github/sync.yml, files deleted in the source repo don't get deleted from the destination repo. In addition, folders renamed in the source repo appear twice in the destination repo, with old and new names.
📚 To reproduce
In source repo
# .github/sync.yml
zoylendt/zoylendt.github.io@v4:
- source: public/
dest: content/
deleteOrphaned: true
# .github/workflows/sync.yml
name: Sync Files
on:
push:
branches:
- main
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@master
- name: Run GitHub File Sync
uses: BetaHuhn/repo-file-sync-action@latest
with:
GH_PAT: ${{ secrets.GH_PAT }}
SKIP_PR: true
Folder structure:
/
├── .github
│ ├── sync.yml
│ └── workflows
│ └── sync.yml
├── private
│ └── .gitkeep
└── public
├── A.md
└── folder2
└── C.md
In destination repo
B.md has been deleted in the source repo, folder1 has been renamed to folder2 (both after they have been synced to the destination repo). However, they don't get deleted from the destination repo.
Folder structure:
/
├── .github
├── misc
│ └── .gitkeep
└── content
├── A.md
├── B.md
└── folder1
│ └── C.md
└── folder2
└── C.md
💡 Expected behavior
Deleted/renamed files in the source repo and folders should be deleted/renamed in the destination repo aswell, including files/folders in subdirectories.
🖼️ Screenshots
No response
⚙️ Environment
Tested with v1 and latest, as mentioned here: https://github.com/BetaHuhn/repo-file-sync-action?tab=readme-ov-file#versioning
📋 Additional context
No error messages appear in the actions log.
I authenticated using GH_PAT, with full repo scope, see #31
Maybe the issue is related to SKIP_PR: true?