ci(docs): Fix build doc error

This commit is contained in:
Fangyin Cheng 2025-03-03 12:13:13 +08:00
parent 7ce8b3dd4a
commit 5faf6282f0

View File

@ -25,7 +25,13 @@ COPY . /app
# Make sure we have the latest version of the repository
RUN if [ "$CI" = "true" ]; then \
git fetch --prune --unshallow; \
# Check if the repo is shallow before trying to unshallow it
if git rev-parse --is-shallow-repository | grep -q 'true'; then \
git fetch --prune --unshallow; \
else \
echo "Repository is already complete, skipping unshallow"; \
git fetch --prune; \
fi; \
fi
ARG NUM_VERSION=2