From 8f2cb22caf5f3fe4f7a3f3d3af3c8b13c34fbf9a Mon Sep 17 00:00:00 2001 From: mulingyuer <1321968423@qq.com> Date: Fri, 17 Jan 2025 11:22:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 6272065..4d0b92f 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -36,7 +36,15 @@ jobs: run: pnpm build - name: 克隆preview分支 - run: git clone --branch=preview --single-branch . ../preview + run: | + if git show-ref --verify --quiet refs/remotes/origin/preview; then + git clone --branch=preview --single-branch . ../preview + else + git clone . ../preview + cd ../preview + git checkout --orphan preview + git rm -rf . + fi - name: 清理preview分支 run: |