https://github.com/entur/gha-firebase
https://github.com/entur/gha-firebase
ghas-ignore github team-plattform
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/entur/gha-firebase
- Owner: entur
- Created: 2024-06-18T17:44:22.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-05-04T07:46:57.000Z (about 2 months ago)
- Last Synced: 2026-05-04T08:24:17.870Z (about 2 months ago)
- Topics: ghas-ignore, github, team-plattform
- Language: JavaScript
- Homepage:
- Size: 946 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: .github/README.md
- Changelog: CHANGELOG.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
entur/gha-firebase
[](https://github.com/entur/gha-firebase/actions/workflows/ci.yml)
GitHub Actions for working with Firebase in Google Cloud
- [Firebase Hosting Preview](../README-firebase-hosting-preview.md)
- [Firebase Hosting Deploy](../README-firebase-hosting-deploy.md)
## Golden Path
- `./firebase.json` at the root of your repository
### Example
Let's look at an example, assume our repo is called `amazing-app`:
```sh
λ amazing-app ❯ tree
.
├── README.md
├── firebase.json
└── .github
└── workflows
└── PR.yml
```
```yaml
# pr.yml
name: Build, preview and deploy
on:
pull_request:
on:
pull_request:
jobs:
# buildstep not included, can be defined in .firebase.json as a predeploy step or as a job here
# Create a preview
firebase-preview-dev:
needs: yarn-build
uses: entur/gha-firebase/.github/workflows/firebase-hosting-preview.yml@v1
with:
gcp_project_id: my-gcp-project-dev
environment: dev
build_artifact_name: artifacts
build_artifact_path: build
# Approval step
firebase-approve:
needs: firebase-preview-dev
runs-on: ubuntu-latest
environment: apr # a dedicated "Approval" environment
steps:
- name: Approve deployment
run: echo "Approving deployment"
# Deploy to the "live" channel
firebase-deploy-dev:
needs: firebase-approve
uses: entur/gha-firebase/.github/workflows/firebase-hosting-deploy.yml@v1
with:
gcp_project_id: my-gcp-project-dev
environment: dev
build_artifact_name: artifacts
build_artifact_path: build
```
PS: To get a stop before we deploy to production we use "Environment protection rules":
