From 556bba81e368cbc7670fc9f7a802031e1ba094aa Mon Sep 17 00:00:00 2001 From: M1hono Date: Mon, 28 Oct 2024 04:18:25 +1100 Subject: [PATCH] Try to optimize build speed. --- .github/workflows/deploy.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dcb95b84..d6638019 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -53,16 +53,15 @@ jobs: if ! grep -q github.com ~/.ssh/known_hosts; then ssh-keyscan github.com >> ~/.ssh/known_hosts fi - GIT_SSH_COMMAND='ssh -i /home/mihono/.ssh/id_rsa' git clone --depth 1 git@github.com:M1hono/CrychicDocSynchronization.git temp_repo - - - name: Copy necessary files - run: | - if [ -d temp_repo/.github ]; then - cp -r temp_repo/.github .vitepress/dist/ - fi - if [ -f temp_repo/CNAME ]; then - cp temp_repo/CNAME .vitepress/dist/ - fi + mkdir temp_repo + cd temp_repo + git init + git remote add -f origin git@github.com:M1hono/CrychicDocSynchronization.git + git config core.sparseCheckout true + echo ".github/workflow/deploy.yaml" >> .git/info/sparse-checkout + GIT_SSH_COMMAND='ssh -i /home/mihono/.ssh/id_rsa' git pull origin main --depth 1 + cd .. + cp temp_repo/.github/workflow/deploy.yaml .vitepress/dist/.github/workflow/ - name: Push to private repo run: |