Skip to content

Merge pull request #73 from theaiscope/dependabot/npm_and_yarn/functi… #40

Merge pull request #73 from theaiscope/dependabot/npm_and_yarn/functi…

Merge pull request #73 from theaiscope/dependabot/npm_and_yarn/functi… #40

name: Firebase functions deployment
on:
push:
branches:
- main
jobs:
test:
uses: ./.github/workflows/test-workflow.yml
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version-file: './functions/.nvmrc'
cache: yarn
cache-dependency-path: ./functions/yarn.lock
- name: Install dependencies
run: |
cd functions
yarn install
- name: Deploy to Firebase test
uses: w9jds/firebase-action@master
with:
args: deploy --only functions -P test
env:
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY_TEST }}
- name: Deploy to Firebase prod
uses: w9jds/firebase-action@master
with:
args: deploy --only functions -P default
env:
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}