From 3095d25dca9f6f2acb539c80b8dc346ad1cad1b2 Mon Sep 17 00:00:00 2001 From: 1834423612 <1834423612@qq.com> Date: Mon, 3 Jun 2024 17:42:46 -0400 Subject: [PATCH] update: deploy problems --- .github/workflows/deploy.yml | 9 +++++---- .gitignore | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 75c66f13..6261e0ac 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -39,15 +39,16 @@ jobs: echo "Fetching all branches" git fetch origin - echo "Checking if webpage branch exists" + echo "Checking out webpage branch" if git show-ref --verify --quiet refs/heads/webpage; then - echo "webpage branch exists, checking out" git checkout webpage else - echo "webpage branch does not exist, creating new branch" - git checkout -b webpage + git checkout --orphan webpage fi + echo "Cleaning old files" + git rm -rf . + echo "Copying build files to webpage branch" cp -r temp-deploy/* . diff --git a/.gitignore b/.gitignore index 3a3c0c07..84112a22 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ logs # Git .git -.gitignore .gitattributes .gitmodules .gitkeep @@ -34,3 +33,7 @@ logs # Package manager package-lock.json yarn.lock +pnpm-lock.yaml + +# deployment +temp-deploy