Skip to content

Commit ef4755f

Browse files
Copilotmercyblitz
andcommitted
Fix wiki-publish: clean stale wiki pages before copying generated content
The workflow was not removing old wiki pages before copying freshly generated ones. When Java classes were renamed or deleted, their corresponding wiki pages persisted because only new/updated files were copied over the existing wiki repo. Add a find-delete step to remove all existing .md files from the wiki repo before copying, so git add -A properly tracks deletions alongside additions and modifications. Co-authored-by: mercyblitz <533114+mercyblitz@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsphere-projects/microsphere-java/sessions/e3c5a18a-8246-4b36-a700-fa2fd4a54335
1 parent 4d91a33 commit ef4755f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/wiki-publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ jobs:
5555
5656
- name: Copy generated pages to wiki
5757
run: |
58+
# Remove all existing markdown files from wiki repo to ensure
59+
# pages for renamed or deleted classes are properly cleaned up
60+
find wiki-repo -maxdepth 1 -name '*.md' -type f -delete 2>/dev/null || true
5861
# Copy all generated markdown files to the wiki repo
5962
cp wiki-output/*.md wiki-repo/
6063
echo "Copied wiki pages to wiki repository"

0 commit comments

Comments
 (0)