Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lowply/deploy-firebase
A GitHub Action to deploy to Firebase Hosting
https://github.com/lowply/deploy-firebase
firebase github-actions
Last synced: 7 days ago
JSON representation
A GitHub Action to deploy to Firebase Hosting
- Host: GitHub
- URL: https://github.com/lowply/deploy-firebase
- Owner: lowply
- License: mit
- Created: 2019-02-24T16:55:26.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-10-14T16:25:13.000Z (about 2 years ago)
- Last Synced: 2024-10-31T18:12:42.831Z (14 days ago)
- Topics: firebase, github-actions
- Language: Shell
- Size: 13.7 KB
- Stars: 68
- Watchers: 3
- Forks: 96
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deploy to Firebase
A GitHub Action to deploy to Firebase Hosting.
- Make sure that you checkout the repository using the [actions/checkout](https://github.com/actions/checkout) action
- Make sure that you have the `firebase.json` file in the repository
- To obtain the Firebase token, run `firebase login:ci` on your local computer and [store the token](https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository) as the `FIREBASE_TOKEN` secret
- Specify the Firebase project name in the `FIREBASE_PROJECT` env var## Workflow examples
Deploy the `main` branch when a commit is pushed to it:
```
name: Deploy the main branch
on:
push:
branches:
- main
jobs:
main:
name: Deploy to Firebase
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: lowply/[email protected]
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_PROJECT: name-of-the-project
```Deploy only when a tag starts with `v` is pushed:
```
name: Deploy a tag
on:
push:
tags:
- v*
jobs:
main:
name: Deploy to Firebase
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: lowply/[email protected]
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_PROJECT: name-of-the-project
```