Skip to content

Commit c67cf38

Browse files
committed
chore: sparse checkout content from master
1 parent 0c73244 commit c67cf38

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.changeset/hot-llamas-approve.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"r.obin.ch": patch
3+
---
4+
5+
Sparse checkout master content instead copy

.github/workflows/cd-deploy.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ jobs:
3737
ref: master
3838
path: master-content
3939

40-
- name: Copy content from master
40+
- name: Setup sparse checkout for content from master
4141
run: |
42-
rm -rf ${{ env.BUILD_PATH }}/src/content
43-
cp -r master-content/src/content/ ${{ env.BUILD_PATH }}/src/
42+
git -C ${{ env.BUILD_PATH }} sparse-checkout init --cone
43+
git -C ${{ env.BUILD_PATH }} sparse-checkout set src/content
44+
git -C ${{ env.BUILD_PATH }} fetch origin master
45+
git -C ${{ env.BUILD_PATH }} checkout origin/master -- src/content
4446
4547
- name: Setup pnpm
4648
uses: pnpm/action-setup@v4

0 commit comments

Comments
 (0)