Skip to content

Commit 4461925

Browse files
committed
.github: fix deploy issue
- We already have the SHA - Use 'git add -A' to handle deleted files too Signed-off-by: Joachim Wiberg <[email protected]>
1 parent de544a5 commit 4461925

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

.github/workflows/docs.yml

Lines changed: 5 additions & 6 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

@@ -82,19 +82,18 @@ jobs:
8282
8383
- name: Commit and push
8484
run: |
85-
cd pages
86-
85+
cd pages/
8786
if [ -z "$(git status --porcelain)" ]; then
8887
exit 0
8988
fi
9089
9190
SRC_REPO="${GITHUB_REPOSITORY}"
92-
SRC_REF="$(git -C .. rev-parse --short HEAD)"
91+
SRC_REF="${GITHUB_SHA::7}"
9392
SRC_URL="https://github.com/${SRC_REPO}/commit/${SRC_REF}"
9493
9594
git config user.name "GitHub Actions"
9695
git config user.email "[email protected]"
97-
git add .
96+
git add -A
9897
git commit -m "docs: update from ${SRC_REPO}@${SRC_REF}" \
9998
-m "For details, see ${SRC_URL}"
10099
git push

0 commit comments

Comments
 (0)