website/.circleci/config.yml

66 lines
1.4 KiB
YAML
Raw Normal View History

2018-06-24 22:01:50 -04:00
version: 2
2018-07-17 21:30:40 -04:00
2018-06-24 22:01:50 -04:00
jobs:
2018-07-17 21:25:14 -04:00
build:
2018-07-17 21:20:07 -04:00
docker:
- image: circleci/node:10.4-browsers
2018-06-24 22:01:50 -04:00
2018-07-17 21:20:07 -04:00
working_directory: ~/repo
2018-06-24 22:01:50 -04:00
2018-07-17 21:20:07 -04:00
steps:
- checkout
2018-06-24 22:01:50 -04:00
2018-07-17 21:30:40 -04:00
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
2018-06-24 22:01:50 -04:00
2018-07-17 21:30:40 -04:00
- run:
name: Install Dependancies
2018-07-17 22:08:12 -04:00
command: |
yarn
2018-06-24 22:01:50 -04:00
2018-07-17 21:30:40 -04:00
- save_cache:
key: v1-dependencies-{{ checksum "package.json" }}
2018-07-17 22:08:12 -04:00
paths:
- node_modules
2018-07-17 21:20:07 -04:00
2018-07-17 21:30:40 -04:00
- run:
name: Build
command: yarn build
2018-07-17 21:20:07 -04:00
2018-07-17 22:08:12 -04:00
- persist_to_workspace:
root: ./
paths:
- public
2018-07-24 11:38:38 -04:00
- node_modules
2018-07-17 22:17:10 -04:00
- store_artifacts:
path: public
2018-07-17 21:20:07 -04:00
2018-07-17 22:14:39 -04:00
deploy:
2018-07-17 21:20:07 -04:00
docker:
- image: circleci/node:10.4-browsers
2018-07-17 22:08:12 -04:00
working_directory: ~/repo
2018-07-17 21:20:07 -04:00
2018-07-17 21:30:40 -04:00
steps:
2018-07-17 22:22:36 -04:00
- checkout
2018-07-17 22:09:18 -04:00
- attach_workspace:
2018-07-17 22:08:12 -04:00
at: ./
2018-07-17 21:20:07 -04:00
2018-07-17 21:30:40 -04:00
- run:
name: Deploy
2018-07-17 22:08:12 -04:00
command: yarn firebase deploy --token "${FIREBASE_TOKEN}"
2018-06-24 22:01:50 -04:00
2018-07-17 21:20:07 -04:00
workflows:
version: 2
2018-07-17 21:30:40 -04:00
2018-07-17 21:20:07 -04:00
build_and_deply:
jobs:
2018-07-17 21:25:14 -04:00
- build
2018-07-17 22:11:47 -04:00
- deploy:
2018-07-17 22:08:12 -04:00
requires:
- build