Skip to content

A GitHub Action to deploy to Firebase Hosting

License

Notifications You must be signed in to change notification settings

SchwaIndustries/deploy-firebase

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy to Firebase

A GitHub Action to deploy to Firebase Hosting

  • You can choose a specific branch to allow deployment by using the TARGET_BRANCH env var (master if not specified).
  • Make sure you have the firebase.json file in the repository
  • Get the Firebase token by running firebase login:ci and store it as the FIREBASE_TOKEN secret
  • Set the project name in the FIREBASE_PROJECT env var

Example workflow

name: Build and Deploy
on:
  push:
    branches:
    - main
jobs:
  main:
    name: Build and Deploy
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@master
    - name: Build Hugo
      uses: lowply/[email protected]
    - name: Deploy to Firebase
      uses: lowply/[email protected]
      env:
        FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
        FIREBASE_PROJECT: name-of-the-project
        TARGET_BRANCH: main

About

A GitHub Action to deploy to Firebase Hosting

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 75.5%
  • Dockerfile 24.5%