add firebase hosting deploy script
This commit is contained in:
parent
5eb7b1ccff
commit
b3b38e1af8
31
.github/workflows/firebase-hosting-deploy.yml
vendored
Normal file
31
.github/workflows/firebase-hosting-deploy.yml
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
name: Firebase Hosting
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
secrets:
|
||||||
|
FIREBASE_SA:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-firebase:
|
||||||
|
name: Deploy to Firebase Hosting
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: alpine:3.19
|
||||||
|
steps:
|
||||||
|
- run: apk add git nodejs npm
|
||||||
|
name: Install dependencies
|
||||||
|
- run: npm install -g firebase-tools
|
||||||
|
name: Install Firebase CLI from NPM
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Download built app
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: built-app
|
||||||
|
path: dist
|
||||||
|
- run: echo $FIREBASE_SA > gcloud-service-key.json
|
||||||
|
name: Generate Service Account file
|
||||||
|
env:
|
||||||
|
FIREBASE_SA: ${{ secrets.FIREBASE_SA }}
|
||||||
|
- run: firebase deploy only --hosting
|
||||||
|
name: Run deploy command
|
||||||
|
env:
|
||||||
|
GOOGLE_APPLICATION_CREDENTIALS: gcloud-service-key.json
|
Loading…
x
Reference in New Issue
Block a user