From 5faf6282f0d6ca5cf0c1c4f9829549e71c05c1ba Mon Sep 17 00:00:00 2001 From: Fangyin Cheng Date: Mon, 3 Mar 2025 12:13:13 +0800 Subject: [PATCH] ci(docs): Fix build doc error --- docs/Dockerfile-deploy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/Dockerfile-deploy b/docs/Dockerfile-deploy index ea149ffcb..676e43495 100644 --- a/docs/Dockerfile-deploy +++ b/docs/Dockerfile-deploy @@ -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