diff --git a/.github/workflows/firebase-hosting-deploy.yml b/.github/workflows/firebase-hosting-deploy.yml new file mode 100644 index 0000000..f4a6c4f --- /dev/null +++ b/.github/workflows/firebase-hosting-deploy.yml @@ -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