forked from weaviate/weaviate-io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (54 loc) · 1.54 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
language: node_js
node_js:
- 16
# branches:
# only:
# - main
cache:
yarn: true
before_cache:
- echo "---BEFORE CACHE---"
# Don't store .cache/webpack on the main branch
# This is to make sure the version-config.json gets updated properly
- |
if [ $TRAVIS_BRANCH = "main" ]; then
rm -vrf node_modules/.cache/webpack
fi
install:
- yarn install
script:
- node _build_scripts/update-config-versions.js
# Build the project
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] ; then
yarn build
# Deploy draft to Netlify
source _build_scripts/publish-draft-to-netlify.sh
else
# for PRs - build a dev version - with trailing slash for links
yarn build-dev
fi
# Send Slack Message
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ $TRAVIS_BRANCH != "main" ]; then
source _build_scripts/slack-find-author.sh
source _build_scripts/slack-netlify-message.sh
fi
# Link Validation
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] ; then
# Validate links on Netlify
source _build_scripts/verify-links.sh
else
# for PRs - validate links from the build.dev folder
source _build_scripts/verify-links-build-dev.sh
fi
###
# Deploy to Cloud Bucket and Production Netlify
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ $TRAVIS_BRANCH = "main" ]; then
source _build_scripts/publish-prod-to-netlify.sh
source _build_scripts/slack-find-author.sh
source _build_scripts/slack-release-message.sh
fi
- echo "It is all done"