diff --git a/.github/workflows/create-docusaurus-pr.yml b/.github/workflows/create-docusaurus-pr.yml index 09cd36641..6c11cc0d4 100644 --- a/.github/workflows/create-docusaurus-pr.yml +++ b/.github/workflows/create-docusaurus-pr.yml @@ -37,20 +37,24 @@ jobs: echo "Source directory does not exist!" exit 1 fi + # Remove old API docs but preserve other folders rm -rf docs-repo/docs/API/ mkdir -p docs-repo/docs/API + # Copy all markdown files and maintain directory structure cp -r source-repo/api/docs/public/. docs-repo/docs/API/ - # Ensure images directory is properly copied + # Clean and copy images directory specifically + rm -rf docs-repo/docs/API/images/ + mkdir -p docs-repo/docs/API/images + + # Copy images from public/images if they exist if [ -d "source-repo/api/docs/public/images" ]; then - mkdir -p docs-repo/docs/API/images cp -r source-repo/api/docs/public/images/. docs-repo/docs/API/images/ fi - # Also check for images in the parent docs directory + # Also copy any images from the parent docs/images directory if [ -d "source-repo/api/docs/images" ]; then - mkdir -p docs-repo/docs/API/images cp -r source-repo/api/docs/images/. docs-repo/docs/API/images/ fi - name: Create Pull Request