fix(docs): Fix document build error (#2271)

This commit is contained in:
Fangyin Cheng
2025-01-03 16:38:10 +08:00
committed by GitHub
parent 0e3b2dc818
commit de629f467d
3 changed files with 39 additions and 5 deletions

View File

@@ -51,6 +51,19 @@ RUN git config --global --add safe.directory /app && \
echo "Creating version $TAG"; \
cd /app/docs && git checkout $TAG; \
echo "Checked out to tag: $TAG"; \
# Check if there is a patch for the current version in app-build
echo "Checking patch in /app-build/docs/patchs..." && \
if [ -f "/app-build/docs/patchs/fix_${TAG/v/}.patch" ]; then \
echo "Found patch for version $TAG in /app-build/docs/patchs, applying..."; \
cd /app && \
git apply "/app-build/docs/patchs/fix_${TAG/v/}.patch" && \
echo "Patch applied successfully" || \
echo "Failed to apply patch for $TAG"; \
echo "Current sidebars.js content:"; \
cat /app/docs/sidebars.js; \
else \
echo "No patch found for $TAG in /app-build/docs/patchs"; \
fi; \
# Copy the necessary files to the build directory for each tag
rm -rf /app-build/docs/docs /app-build/docs/sidebars.js /app-build/docs/static /app-build/docs/src && \
cp -r /app/docs/docs /app-build/docs/ && \