Skip to content

Commit 7b54a0c

Browse files
committed
build: only deploy docs when tagging a commit
1 parent 7b2a8a3 commit 7b54a0c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scripts/docs-check.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
echo "prev commit: $CACHED_COMMIT_REF"
22
echo "current commit: $COMMIT_REF"
33
git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF docs package.json pnpm-lock.yaml netlify.toml scripts/docs-check.sh
4-
status=$?
5-
echo "diff exit code: $status"
6-
exit $status
4+
has_diff=$?
5+
git describe --exact-match --tags $(git log -n1 --pretty='%h')
6+
has_tag=$?
7+
8+
echo "diff exit code: $has_diff"
9+
echo "tag exit code: $has_tag"
10+
11+
exit $(($has_diff || $has_tag))

0 commit comments

Comments
 (0)