> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# azdevs/firebase-deploy

Orb for deploying to Firebase.

## Commands

### deploy

Deploy to Firebase

| Parameter | Type | Default | Description |
|---|---|---|---|
| `token` | string |  | Firebase Deploy Token |
| `alias` | string | default | Firebase project alias to deploy to |

## Examples

### default

Deploying to your "default" Firebase project alias

```yaml
version: 2.1
orbs:
  firebase-deploy: azdevs/firebase-deploy@1.0.0
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:
    docker:
      - image: circleci/node:lts
    steps:
      - attach_workspace:
          at: /tmp/workspace
      - firebase-deploy/deploy:
          token: $FIREBASE_DEPLOY_TOKEN
workflows:
  build-and-deploy:
    jobs:
      - build
      - deploy:
          requires:
            - build
```

### alias

Deploying to a custom Firebase project alias

```yaml
version: 2.1
orbs:
  firebase-deploy: azdevs/firebase-deploy@1.0.0
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:
    docker:
      - image: circleci/node:lts
    steps:
      - attach_workspace:
          at: /tmp/workspace
      - firebase-deploy/deploy:
          token: $FIREBASE_DEPLOY_TOKEN
          alias: staging
workflows:
  build-and-deploy:
    jobs:
      - build
      - deploy:
          requires:
            - build
```