New build order

This commit is contained in:
Zakary Timson 2018-07-17 22:08:12 -04:00
parent 8af7029d28
commit 1643ba183d
3 changed files with 20 additions and 27 deletions

View File

@ -17,45 +17,39 @@ jobs:
- run: - run:
name: Install Dependancies name: Install Dependancies
command: yarn command: |
yarn
cd functions && yarn
- save_cache: - save_cache:
key: v1-dependencies-{{ checksum "package.json" }} key: v1-dependencies-{{ checksum "package.json" }}
paths: node_modules paths:
- node_modules
- functions/node_modules
- run: - run:
name: Build name: Build
command: yarn build command: yarn build
- run: - persist_to_workspace:
name: Deploy root: ./
command: yarn firebase deploy --token "${FIREBASE_TOKEN} --only hosting" paths:
- public
- functions/node_modules
deploy_functions: deploy_functions:
docker: docker:
- image: circleci/node:10.4-browsers - image: circleci/node:10.4-browsers
working_directory: ~/repo/functions working_directory: ~/repo
steps: steps:
- checkout -attach_workspace:
at: ./
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run:
name: Install Dependancies
command: yarn
- save_cache:
key: v1-dependencies-{{ checksum "package.json" }}
paths: node_modules
- run: - run:
name: Deploy name: Deploy
command: cd .. && yarn firebase deploy --token "${FIREBASE_TOKEN}" --only functions command: yarn firebase deploy --token "${FIREBASE_TOKEN}"
workflows: workflows:
version: 2 version: 2
@ -63,4 +57,6 @@ workflows:
build_and_deply: build_and_deply:
jobs: jobs:
- build - build
- deploy_functions - deploy
requires:
- build

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
.DS_STORE .DS_STORE
functions/lib
/dist/ /dist/
/public/ /public/
bazel-* bazel-*

View File

@ -1,11 +1,7 @@
{ {
"hosting": { "hosting": {
"public": "public", "public": "public",
"ignore": [ "ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [ "rewrites": [
{ {
"source": "**", "source": "**",