All Projects → FirebaseExtended → Action Hosting Deploy

FirebaseExtended / Action Hosting Deploy

Licence: apache-2.0
Automatically deploy shareable previews for your Firebase Hosting sites

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Action Hosting Deploy

Rocket
Automated software delivery as fast and easy as possible 🚀
Stars: ✭ 217 (+30.72%)
Mutual labels:  firebase, continuous-deployment
Workshops
Workshops organized to introduce students to security, AI, AR/VR, hardware and software
Stars: ✭ 162 (-2.41%)
Mutual labels:  firebase
Uber React
Uber-like project in React Native
Stars: ✭ 151 (-9.04%)
Mutual labels:  firebase
Syncd
syncd是一款开源的代码部署工具,它具有简单、高效、易用等特点,可以提高团队的工作效率.
Stars: ✭ 2,065 (+1143.98%)
Mutual labels:  continuous-deployment
Gappein Chat Sdk
A plug and play modular toolkit for integrating the Chat feature on top of Firebase!
Stars: ✭ 154 (-7.23%)
Mutual labels:  firebase
Space
A real time chat app for developers built using React, Redux, Electron and Firebase
Stars: ✭ 161 (-3.01%)
Mutual labels:  firebase
Angular Lab
Angular Lab
Stars: ✭ 151 (-9.04%)
Mutual labels:  firebase
Firebase React Native Redux Starter
Starter For Firebase, React Native, Redux Applications With 100% Of Code In Common Between IOS And Android, with built In Authentication, Crud Example And Form Validation.
Stars: ✭ 166 (+0%)
Mutual labels:  firebase
Fireo
Google Cloud Firestore modern and simplest convenient ORM package in Python. FireO is specifically designed for the Google's Firestore
Stars: ✭ 163 (-1.81%)
Mutual labels:  firebase
Happy Plants
🌵 Web application to manage plants
Stars: ✭ 157 (-5.42%)
Mutual labels:  firebase
Friendlypix Ios
Friendly Pix iOS is a sample app demonstrating how to build an iOS app with the Firebase Platform.
Stars: ✭ 157 (-5.42%)
Mutual labels:  firebase
React Firebase File Uploader
An image uploader for react that uploads images to your firebase storage
Stars: ✭ 155 (-6.63%)
Mutual labels:  firebase
Photostream
A photo sharing iOS app that uses Firebase and is being driven by VIPER architecture.
Stars: ✭ 162 (-2.41%)
Mutual labels:  firebase
Pul
PÜL - A carpooling app designed for students to help each other get more involved in their community.
Stars: ✭ 152 (-8.43%)
Mutual labels:  firebase
Julienne
Sample app for sharing recipes built with React, Typescript, Firebase and Sancho
Stars: ✭ 165 (-0.6%)
Mutual labels:  firebase
Fledge
Fledge: A CI/CD tool for Flutter
Stars: ✭ 152 (-8.43%)
Mutual labels:  continuous-deployment
Pokidex
Android app that identifies and detects Pokemons in the provided Image using Tensorflow Lite and Firebase MLKit
Stars: ✭ 157 (-5.42%)
Mutual labels:  firebase
Flutter commerce
An Ecommerce application built in Flutter using Firebase.
Stars: ✭ 148 (-10.84%)
Mutual labels:  firebase
Awesome Opensource Apps
🏠ℹ️ Curated list of awesome open source crafted web & mobile applications - Learn, Fork, Contribute & Most Importantly Enjoy!
Stars: ✭ 2,199 (+1224.7%)
Mutual labels:  firebase
Continuouspipe
The open-source continuous deployment pipeline for containerized applications
Stars: ✭ 166 (+0%)
Mutual labels:  continuous-deployment

🔥🌎 Firebase Hosting GitHub Action

  • Creates a new preview channel (and its associated preview URL) for every PR on your GitHub repository.
  • Adds a comment to the PR with the preview URL so that you and each reviewer can view and test the PR's changes in a "preview" version of your app.
  • Updates the preview URL with changes from each commit by automatically deploying to the associated preview channel. The URL doesn't change with each new commit.
  • (Optional) Deploys the current state of your GitHub repo to your live channel when the PR is merged.

Setup

A full setup guide can be found in the Firebase Hosting docs.

The Firebase CLI can get you set up quickly with a default configuration.

  • If you've NOT set up Hosting, run this version of the command from the root of your local directory:
firebase init hosting
  • If you've ALREADY set up Hosting, then you just need to set up the GitHub Action part of Hosting. Run this version of the command from the root of your local directory:
firebase init hosting:github

Usage

Deploy to a new preview channel for every PR

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

name: Deploy to Preview Channel

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

jobs:
  build_and_preview:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      # Add any build steps here. For example:
      # - run: npm ci && npm run build
      - uses: FirebaseExtended/[email protected]
        with:
          repoToken: "${{ secrets.GITHUB_TOKEN }}"
          firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
          expires: 30d
          projectId: your-Firebase-project-ID

Deploy to your live channel on merge

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

name: Deploy to Live Channel

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

jobs:
  deploy_live_website:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[email protected]
      # Add any build steps here. For example:
      # - run: npm ci && npm run build
      - uses: FirebaseExtended/[email protected]
        with:
          repoToken: "${{ secrets.GITHUB_TOKEN }}"
          firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
          projectId: your-Firebase-project-ID
          channelId: live

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.

repoToken {string}

Adding repoToken: "${{secrets.GITHUB_TOKEN}}" lets the action comment on PRs with the preview URL for the associated preview channel. You don't need to set this secret yourself - GitHub sets it automatically.

If you omit this option, you'll need to find the preview URL in the action's build log.

expires {string}

The length of time the preview channel should remain active after the last deploy. If left blank, the action uses the default expiry of 7 days. The expiry date will reset to this value on every new deployment.

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.

channelId {string}

The ID of the channel to deploy to. If you leave this blank, a preview channel and its ID will be auto-generated per branch or PR. If you set it to live, the action deploys to the live channel of your default Hosting site.

You usually want to leave this blank so that each PR gets its own preview channel. An exception might be that you always want to deploy a certain branch to a long-lived preview channel (for example, you may want to deploy every commit from your next branch to a preprod preview channel).

target {string}

The target name of the Hosting site to deploy to. If you leave this blank, the default target or all targets defined in the .firebaserc will be deployed to.

You usually want to leave this blank unless you have set up multiple sites in the Firebase Hosting UI and are trying to target just one of those sites with this action.

Refer to the Hosting docs about multiple sites for more information about deploy targets.

entryPoint {string}

The location of your firebase.json file relative to the root of your repository. Defaults to . (the root of your repo).

Outputs

Values emitted by this action that can be consumed by other actions later in your workflow

urls

The url(s) deployed to

expire_time

The time the deployed preview urls expire

details_url

A single URL that was deployed to

Status

Status: Experimental

This repository is maintained by Googlers but is not a supported Firebase product. Issues here are answered by maintainers and other community members on GitHub on a best-effort basis.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].