2017-05-14 23:08:13 -07:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
2017-09-06 15:51:46 -07:00
|
|
|
- image: reactcommunity/node-ci:8.4.0-0 # custom image -- includes ocaml, libelf1, Yarn
|
2017-07-19 14:11:11 -07:00
|
|
|
parallelism: 2
|
2017-05-14 23:08:13 -07:00
|
|
|
working_directory: ~/react-navigation
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
2017-05-15 21:51:51 -07:00
|
|
|
# cache by branch + package.json, by branch, and then master
|
|
|
|
keys:
|
2017-05-15 21:53:50 -07:00
|
|
|
- v3-react-navigation-{{ .Branch }}-{{ checksum "package.json" }}
|
|
|
|
- v3-react-navigation-{{ .Branch }}
|
|
|
|
- v3-react-navigation-master
|
2017-05-14 23:16:02 -07:00
|
|
|
- run: yarn # install root deps
|
|
|
|
- run: ./scripts/test.sh # run tests
|
2017-10-20 14:59:01 -07:00
|
|
|
- setup_remote_docker
|
2017-05-14 23:08:13 -07:00
|
|
|
- deploy:
|
|
|
|
command: |
|
2017-10-20 15:04:35 -07:00
|
|
|
set -x
|
|
|
|
VER="17.03.0-ce"
|
|
|
|
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
|
|
|
|
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
|
|
|
|
mv /tmp/docker/* /usr/bin
|
|
|
|
|
2017-05-14 23:08:13 -07:00
|
|
|
if [ "${CIRCLE_BRANCH}" == "master" ]; then
|
2017-05-16 01:55:10 +02:00
|
|
|
# deploy website
|
2017-05-14 23:14:22 -07:00
|
|
|
cd website && yarn && cd ../
|
2017-05-14 23:08:13 -07:00
|
|
|
yarn run build-docs
|
|
|
|
./scripts/deploy-website.sh
|
2017-05-16 01:55:10 +02:00
|
|
|
|
|
|
|
# deploy expo playground demo
|
2017-05-15 21:41:55 -07:00
|
|
|
# exp login -u "$EXPO_USERNAME" -p "$EXPO_PASSWORD"
|
|
|
|
# cd examples/NavigationPlayground && exp publish
|
2017-05-14 23:08:13 -07:00
|
|
|
fi
|
2017-05-15 19:41:03 -07:00
|
|
|
- save_cache:
|
2017-05-15 21:53:50 -07:00
|
|
|
key: v3-react-navigation-{{ .Branch }}-{{ checksum "package.json" }}
|
2017-05-15 19:41:03 -07:00
|
|
|
paths:
|
|
|
|
- ~/.cache/yarn
|
|
|
|
- ~/react-navigation/website/node_modules
|
|
|
|
- ~/react-navigation/examples/NavigationPlayground/node_modules
|
|
|
|
- ~/react-navigation/examples/ReduxExample/node_modules
|