Skip to content

azdevs/firebase-deploy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

firebase-deploy

CircleCI Orb for deploying to Firebase

Usage

Read the docs

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