-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: only deploy docs when tagging a commit
- Loading branch information
Showing
1 changed file
with
8 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
echo "prev commit: $CACHED_COMMIT_REF" | ||
echo "current commit: $COMMIT_REF" | ||
git diff --quiet $CACHED_COMMIT_REF $COMMIT_REF docs package.json pnpm-lock.yaml netlify.toml scripts/docs-check.sh | ||
status=$? | ||
echo "diff exit code: $status" | ||
exit $status | ||
has_diff=$? | ||
git describe --exact-match --tags $(git log -n1 --pretty='%h') | ||
has_tag=$? | ||
|
||
echo "diff exit code: $has_diff" | ||
echo "tag exit code: $has_tag" | ||
|
||
exit $(($has_diff || $has_tag)) |