https://github.com/butlerlogic/action-firebase-cli
Install the Firebase CLI in your action toolchain.
https://github.com/butlerlogic/action-firebase-cli
Last synced: 12 months ago
JSON representation
Install the Firebase CLI in your action toolchain.
- Host: GitHub
- URL: https://github.com/butlerlogic/action-firebase-cli
- Owner: ButlerLogic
- Created: 2020-03-20T19:06:38.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-20T19:56:38.000Z (about 6 years ago)
- Last Synced: 2025-01-10T00:52:48.992Z (over 1 year ago)
- Language: Shell
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Run a Firebase CLI command
Run a command, like `firebase deploy --only hosting`.
## Configuring Firebase
Firebase automatically uses the `FIREBASE_TOKEN` and `FIREBASE_PROJECT` environment variables when provided.
To retrieve the `FIREBASE_TOKEN`, run `firebase login:ci` on your desktop to retrieve your Firebase auth token. Save this as a [repository secret](https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables) in your repository.
The `FIREBASE_PROJECT` is the project ID, which can usually be found in the `.firebaserc` file (`default` attribute). This can be configured in the action instead of a secret.
## Example workflow
```
name: Build and Deploy
on:
push:
branches:
- master
jobs:
main:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@master
- name: Firebase Command
uses: butlerlogic/action-firebase-cli@stable
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
FIREBASE_PROJECT: name-of-the-project
FIREBASE_COMMAND: deploy --only hosting
PRERUN: npm run build
```