build: exit early if only documentation is being updated (#4583)
This commit is contained in:
@@ -11,6 +11,15 @@ branches:
|
|||||||
- master
|
- master
|
||||||
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||||
install: "npm i && npm update"
|
install: "npm i && npm update"
|
||||||
|
before_install:
|
||||||
|
- | # quickly pass if only documentation is being updated
|
||||||
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
TRAVIS_COMMIT_RANGE="FETCH_HEAD...$TRAVIS_BRANCH"
|
||||||
|
fi
|
||||||
|
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$)|(^(docs|examples))/' || {
|
||||||
|
echo "Only docs were updated, stopping build process."
|
||||||
|
exit
|
||||||
|
}
|
||||||
before_deploy:
|
before_deploy:
|
||||||
- npm run build
|
- npm run build
|
||||||
env:
|
env:
|
||||||
|
|||||||
Reference in New Issue
Block a user