Skip to content

Commit

Permalink
build: only deploy docs when tagging a commit
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework committed Jan 15, 2023
1 parent 7b2a8a3 commit 7b54a0c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions scripts/docs-check.sh
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))

0 comments on commit 7b54a0c

Please sign in to comment.