Skip to content

Commit 524f565

Browse files
committed
.github: protect .git worktree or dir
Signed-off-by: Joachim Wiberg <[email protected]>
1 parent de544a5 commit 524f565

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/docs.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Dotty the Documenteer
33
on:
44
push:
55
branches:
6-
- master
6+
- doc
77
paths:
88
- 'doc/**'
99
- 'README.md'
@@ -51,7 +51,7 @@ jobs:
5151
path: site/
5252

5353
deploy:
54-
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
54+
if: github.ref == 'refs/heads/doc' && github.event_name == 'push'
5555
needs: build
5656
runs-on: ubuntu-latest
5757

@@ -78,7 +78,9 @@ jobs:
7878
7979
- name: Sync site to pages repo
8080
run: |
81-
rsync -a --delete --exclude .git site/ pages/
81+
rsync -a --delete --filter='P .git' --filter='P .git/**' site/ pages/
82+
ls -l pages/.git
83+
git -C pages status
8284
8385
- name: Commit and push
8486
run: |

0 commit comments

Comments
 (0)