Skip to content

Commit 216dc75

Browse files
committed
feat: enhance Docusaurus PR workflow to include image copying
- Updated the create-docusaurus-pr.yml workflow to ensure that images from both the API and parent docs directories are copied to the appropriate location in the generated documentation. This maintains the directory structure and improves the completeness of the documentation.
1 parent 1e0a54d commit 216dc75

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/create-docusaurus-pr.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,20 @@ jobs:
3939
fi
4040
rm -rf docs-repo/docs/API/
4141
mkdir -p docs-repo/docs/API
42+
# Copy all markdown files and maintain directory structure
4243
cp -r source-repo/api/docs/public/. docs-repo/docs/API/
44+
45+
# Ensure images directory is properly copied
46+
if [ -d "source-repo/api/docs/public/images" ]; then
47+
mkdir -p docs-repo/docs/API/images
48+
cp -r source-repo/api/docs/public/images/. docs-repo/docs/API/images/
49+
fi
50+
51+
# Also check for images in the parent docs directory
52+
if [ -d "source-repo/api/docs/images" ]; then
53+
mkdir -p docs-repo/docs/API/images
54+
cp -r source-repo/api/docs/images/. docs-repo/docs/API/images/
55+
fi
4356
- name: Create Pull Request
4457
uses: peter-evans/create-pull-request@v7
4558
with:

0 commit comments

Comments
 (0)