forked from remix-run/react-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
38 lines (38 loc) · 1.36 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
language: node_js
node_js: node
cache: npm
env:
- TEST_ENV=cjs BUILD_ENV=cjs
- TEST_ENV=umd BUILD_ENV=umd
- TEST_ENV=source
before_script:
# react-router ESM build is imported by react-router-dom UMD,
# so we need to build it before building react-router-dom UMD
- ([[ "$BUILD_ENV" != "umd" ]] || (cd packages/react-router && BUILD_ENV=esm npm run build))
- ([[ -z "$BUILD_ENV" ]] || npm run build -- --no-website)
# react-router CJS build is imported by react-router-config tests,
# so we need to build it before running react-router-config tests
- ([[ "$BUILD_ENV" = "cjs" ]] || (cd packages/react-router && BUILD_ENV=cjs npm run build))
script:
- npm test
jobs:
include:
- stage: Deploy Website
if: branch = website
env: PUBLIC_PATH=/react-router/
# The website is built as part of the deploy script,
# so we don't need to build it yet.
before_script: npm run build -- --no-website
script: echo "Deploying website to https://reacttraining.com$PUBLIC_PATH"
before_deploy:
- openssl aes-256-cbc -K $encrypted_70c5e56b421c_key -iv $encrypted_70c5e56b421c_iv
-in website_deploy_key.enc -out website_deploy_key -d
- chmod 600 website_deploy_key
- eval $(ssh-agent -s)
- ssh-add website_deploy_key
deploy:
provider: script
script: bash scripts/deploy-website.sh
skip_cleanup: true
on:
branch: website