-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
104 lines (88 loc) · 6.13 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
language: node_js
node_js:
- '10'
- '12'
- '14'
# Use container-based Travis infrastructure.
sudo: false
branches:
only:
- main
env:
global:
# **GitHub**: `GitHub (spectacle-ci)` "Tokens"
# GITHUB_DEPLOYMENT_TOKEN
- secure: "sAa4I9Xu3xJJnRp6l2V24Oqapuw1ioiUkFvEIM8cI9o3Jx73OYKz1aw9qmwUlXu/xJVBqcgYlW3iAuUf+e6OufHtlwi0RrTnJv9lfrKNkij5G/grNpgmaXDBi5HWzAykewDNpfZwF5xIcS7+8Kl2R8a2Lym4Rqp+UgLQ/KZCmt1vTuOpK5JNLpf5Y8goB3XcXN6nNzZ4f0JDREQVRWXmVmYImY8jTFyhCxz/3OsffsZqSTs/r6UW0djGqEyV/Ur9HyIqqqCmuhrCphzuK8eYVjk8VSaBhxQSTJDl9cDQarqdzYEa3R+kJ+6i+yzlN7PIji7MUZTt339/eTgn2JIFBR+nokxRo19lm6BMuO5dTBZyzi9q1ZbSXWNV9EM72pXvyV+nzVLvwt830cRojmK1BZv7tu0M9AzzS9zbEYMmG9ZWMUWhfEgSq50GpJSz5YepLOK+XU7B9ceP1zb58LNqx4Yf/tW1hG2bmtrkV2qd1l2AwpvpzdqFY9PzDwXzd6b2mDyyF8w3vy/9C8FmBtK+pa34H/39k/Xwshbhrn7cSxd5OtmUAyl+DZoiavrR6eYuwspyvopSRCFdaR6g8K32C1Q9sfMHeGs1my/ddT58exW7DOk7DoUfagz0oyAuGD11T4QYRIsMbS2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GM8RuKfjC8I3mI9WNA8DEHFCotbga1P25x5cKXrCiY="
# AWS_SECRET_ACCESS_KEY
- secure: "X+yoYTadgd0KT77BfzPO0/oqbAIAbwIRhaNRv9DW/bg/eb/4xapTrtQLdG/vG9txSpHuK94XSsFAJni5Fuo4dA6fheQvhLAWRVMh+8vv6rr78sOYDJfE0jJJUgDrB4aRIhbtdMnzm0Q52CAtZPIP+bcheZnpOA3ljpDd28nqK4PGIsN0avjWg+5pKB+HY535x+NNHmlIPMyeeklLGy5+sM4XbiJ5cAFmE6WWighSpJIekHddpPBu7LF8ogiq938gXpLoZtHq+XGlr5e5IJxxZM+AoL4EQnmD//Oyk3GrFfcBzh5bAOj8U1v1a62UUD8l2m0o8im3Twm261mJhT1l15ARkcDk/uOjNJD+O/RcddJH371R9GWH1ARSLg/2RQsD96oHSoisOG9Au2wUg1dXSDzjDB5Y+j3LUqH1D7OEV1s6U57NvryiBOvfHVE/n7uV/kXDMNagJ4p/JiL/HsG9UZSdz5s/Ytrv07squeGtpAz+RlfVuepxB5rVPFxYrX9LAi6bNPkZjt+eEUmQZs4SWNqAcG65Om0dcmCDY9Ywnzk/cBEu30iN7jsnWG41y2SMr1ybFbX/nrV4lIphtXE3dMXyIT1bKkrEiylR5aL2ycdUQEoX73tMDEMVcJVQK+w6ozFsN3UpZv5ayfEUxCsZCR9f6tRlhJgHy7g0Epb+VX0="
before_install:
# Add `aws` CLI tool.
- pip install --user awscli
install:
# Fail if lockfile outdated.
# https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-frozen-lockfile
- yarn install --frozen-lockfile
notifications:
email:
on_success: change
on_failure: always
script:
- yarn --version
- node --version
- aws --version
# Conditionally build core.
#
# Note: If there is an empty diff (like git internal catchup) this will exit 1 with
# stack trace which is still what we want (no changes).
# See: https://reflectoring.io/skip-ci-build/#using-a-git-diff-in-the-ci-build
- export CHANGED_FILES=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
- |
npx -q match-str -e "^(docs\/)" -s "${CHANGED_FILES}" && \
{ echo "[CHANGES] Building core."; } || \
{ echo "[NO CHANGES] No core changes. Skipping build."; travis_terminate 0; }
# Core library
- yarn run build
# Build all examples to make sure they're not broken.
- yarn build-examples
# All other checks.
- yarn run check-ci
jobs:
include:
- stage: documentation
node_js: '12'
script:
# Only do the docs build/deploy if docs changes.
# We early terminate the entire job which should also skip `deploy` tasks.
#
# Note: If there is an empty diff (like git internal catchup) this will exit 1 with
# stack trace which is still what we want (no changes).
# See: https://reflectoring.io/skip-ci-build/#using-a-git-diff-in-the-ci-build
- export CHANGED_FILES=$(git diff --name-only $TRAVIS_COMMIT_RANGE)
- |
npx -q match-str -i "^(\.travis\.yml|docs\/)" -s "${CHANGED_FILES}" && \
{ echo "[CHANGES] Building docs."; } || \
{ echo "[NO CHANGES] No doc changes. Skipping build + deploy."; travis_terminate 0; }
# Install, test.
- cd docs
- yarn install --frozen-lockfile
- yarn run check-ci
# Build and deploy to staging.
- yarn run clean
- yarn run build
- yarn run deploy:stage
deploy:
# Deploy main to production
- provider: script
# _Note_: `deploy.script` must be a **single** command string
script: yarn run deploy:prod
skip_cleanup: true
on:
branch: main