CircleCI Orb for deploying to Firebase
Example .circleci/config.yaml
version: 2.1
orbs:
firebase-deploy: azdevs/[email protected]
jobs:
build:
docker:
- image: circleci/node:lts
steps:
- checkout
- restore_cache:
key: v1-yarn-{{ checksum "yarn.lock" }}
- run: yarn install
- save_cache:
key: v1-yarn-{{ checksum "yarn.lock" }}
paths:
- ./node_modules
- run: yarn build
- persist_to_workspace:
root: /tmp/workspace
paths:
- dist
- firebase.json
- .firebaserc
- firestore.rules
- firestore.indexes.json
deploy-staging:
docker:
- image: circleci/node:lts
steps:
- attach_workspace:
at: /tmp/workspace
- firebase-deploy/deploy:
token: $FIREBASE_DEPLOY_TOKEN
alias: staging # name of an alias from your .firebaserc
workflows:
version: 2
build-and-deploy-staging:
jobs:
- build
- deploy-staging:
requires:
- build
filters:
branches:
ignore: master