2019-04-11 16:58:32 -04:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
docker:
|
|
|
|
- image: circleci/node:10.4-browsers
|
|
|
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-dependencies-{{ checksum "package.json" }}
|
|
|
|
- v1-dependencies-
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Install Dependancies
|
|
|
|
command: yarn
|
|
|
|
|
|
|
|
- save_cache:
|
|
|
|
key: v1-dependencies-{{ checksum "package.json" }}
|
2019-04-11 17:00:20 -04:00
|
|
|
paths:
|
|
|
|
- node_modules
|
2019-04-11 16:58:32 -04:00
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build
|
2019-04-21 16:59:20 -04:00
|
|
|
command: yarn build
|
2019-04-11 16:58:32 -04:00
|
|
|
|
|
|
|
- persist_to_workspace:
|
|
|
|
root: ./
|
2019-04-11 17:00:20 -04:00
|
|
|
paths:
|
|
|
|
- dist/ZaksCode
|
2019-04-11 16:58:32 -04:00
|
|
|
|
|
|
|
- store_artifacts:
|
|
|
|
path: ./dist/ZaksCode
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
docker:
|
2019-04-21 16:59:20 -04:00
|
|
|
- image: circleci/node:10.4-browsers
|
2019-04-11 16:58:32 -04:00
|
|
|
|
|
|
|
working_directory: ~/repo
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
- attach_workspace:
|
|
|
|
at: ./
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Deploy
|
2019-04-21 17:04:29 -04:00
|
|
|
command: |
|
|
|
|
yarn global add firebase-tools
|
|
|
|
yarn firebase deploy --token "${FIREBASE_TOKEN}"
|
2019-04-11 16:58:32 -04:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
|
|
|
|
build_and_deply:
|
|
|
|
jobs:
|
|
|
|
- build
|
|
|
|
- deploy:
|
|
|
|
requires:
|
|
|
|
- build
|
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only: master
|