Skip to content

jxw1102/action-functions-deploy

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Repository files navigation

🔥🌎 Firebase Functions GitHub Action

Usage

Deploy on merge

Add a workflow (.github/workflows/deploy.yml):

name: Deploy Functions

on:
  push:
    branches:
      - main
    # Optionally configure to run only for specific files. For example:
    # paths:
    # - "website/**"

jobs:
  deploy_functions:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: cd functions && npm ci
      - uses: jxw1102/action-functions-deploy@0.7.1
        with:
          firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
          projectId: your-Firebase-project-ID

Options

firebaseServiceAccount {string} (required)

This is a service account JSON key. The easiest way to set it up is to run firebase init hosting:github. However, it can also be created manually.

It's important to store this token as an encrypted secret to prevent unintended access to your Firebase project. Set it in the "Secrets" area of your repository settings and add it as FIREBASE_SERVICE_ACCOUNT: https://github.com/USERNAME/REPOSITORY/settings/secrets.

projectId {string}

The Firebase project that contains the Hosting site to which you want to deploy. If left blank, you need to check in a .firebaserc file so that the Firebase CLI knows which Firebase project to use.

firebaseToolsVersion {string}

The version of firebase-tools to use. If not specified, defaults to latest.

About

Automatically deploy shareable previews for your Firebase Hosting sites

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%