From 47e8760ee81a21b7945170cca954b14fb78579a0 Mon Sep 17 00:00:00 2001 From: GGos3 Date: Sat, 10 Aug 2024 23:34:07 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20workflow=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gatsby-build.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gatsby-build.yml b/.github/workflows/gatsby-build.yml index 138d2a17..99e71722 100644 --- a/.github/workflows/gatsby-build.yml +++ b/.github/workflows/gatsby-build.yml @@ -35,13 +35,16 @@ jobs: # Checkout the publish branch, create if it doesn't exist git checkout -B publish - # Remove all files except .git - find . -not -name '.git' -not -name '.' -exec rm -rf {} + + # Temporarily move the public directory + mv public ../public_temp + + # Clean the working directory + git clean -fdx # Restore the public directory - mv ../public public || true + mv ../public_temp public # Commit and push changes git add -f . git commit -m "Deploy Gatsby build to publish branch" - git push origin publish --force \ No newline at end of file + git push origin publish --force