Skip to content

Commit

Permalink
Try to optimize build speed.
Browse files Browse the repository at this point in the history
  • Loading branch information
M1hono committed Oct 27, 2024
1 parent c6d7a79 commit 556bba8
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]: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 [email protected]: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: |
Expand Down

0 comments on commit 556bba8

Please sign in to comment.