Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sws2apps/firebase-deployment
A GitHub action to deploy to Firebase
https://github.com/sws2apps/firebase-deployment
deployment firebase gcloud github-actions google-cloud hosting marketplace oidc
Last synced: about 2 months ago
JSON representation
A GitHub action to deploy to Firebase
- Host: GitHub
- URL: https://github.com/sws2apps/firebase-deployment
- Owner: sws2apps
- License: mit
- Created: 2022-05-19T07:47:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T04:38:31.000Z (3 months ago)
- Last Synced: 2024-10-25T02:28:31.403Z (3 months ago)
- Topics: deployment, firebase, gcloud, github-actions, google-cloud, hosting, marketplace, oidc
- Language: JavaScript
- Homepage:
- Size: 706 KB
- Stars: 7
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
[![CI](https://github.com/sws2apps/firebase-deployment/actions/workflows/ci.yml/badge.svg)](https://github.com/sws2apps/firebase-deployment/actions/workflows/ci.yml)
[![CD](https://github.com/sws2apps/firebase-deployment/actions/workflows/publish.yml/badge.svg)](https://github.com/sws2apps/firebase-deployment/actions/workflows/publish.yml)# Firebase Deployment
A GitHub Action to deploy firebase hosting and functions together.
- Make sure you have the `firebase.json` file in the root repository, or set a custom path to look for it using the `config` input.
- Set the `workloadIdentityProvider` and `serviceAccount` inputs to authenticate to Google Cloud. Create these values by following the guides on [Setting up Workload Identity Federation](https://github.com/google-github-actions/auth#setting-up-workload-identity-federation). Alternatively, you can try using the CLI [@sws2apps/github-gcloud-cli](https://www.npmjs.com/package/@sws2apps/github-gcloud-cli) to automate the creation of these values.
- Set the project name in the `project` input.## Example Usage
```yaml
name: Deploy to Firebaseon:
push:
branches:
- mainpermissions: read-all
jobs:
main:
name: Build and Deploy
runs-on: ubuntu-latestpermissions:
contents: 'read'
id-token: 'write'steps:
- name: Checkout
uses: actions/checkout@v3- name: Deploy to Firebase
uses: sws2apps/firebase-deployment@main #consider using pin for dependabot auto update
with:
workloadIdentityProvider: ${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}
serviceAccount: ${{ secrets.SERVICE_ACCOUNT }}
node-version: 18 #optional, node-version you want to use following the Semantic Versioning Specification, default to current
config: 'frontend/firebase.json' #optional
function: true #optional & boolean
hosting: true #optional & boolean
project: my-firebase-project #required
```