diff --git a/.github/workflows/firebase-deploy.yml b/.github/workflows/firebase-deploy.yml index fcb588f..a257c14 100644 --- a/.github/workflows/firebase-deploy.yml +++ b/.github/workflows/firebase-deploy.yml @@ -49,6 +49,10 @@ on: You can lean more about how to generate the JSON at https://cloud.google.com/iam/docs/service-accounts-create. The service account must have the minimally required permissions documented at https://firebase.google.com/docs/projects/iam/permissions. required: true + ENV_FILE: + description: | + .env file that is injected in the build context before doing the firebase deployment. + required: false jobs: deployfirebase: @@ -75,6 +79,12 @@ jobs: java-version: '17' - name: Install Firebase CLI Tools run: npm install -g firebase-tools + - name: Load All Environment Variables + env: + env-file: ${{ secrets.ENV_FILE }} + if: ${{ env.env-file != '' }} + run: | + export $("${{ secrets.ENV_FILE }}" | xargs) - name: Run custom command if: ${{ inputs.customcommand != '' }} run: ${{ inputs.customcommand }}