Merge pull request #3184 from davidkassa/dependabot/npm_and_yarn/func… #854
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Staging | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- develop | |
schedule: | |
- cron: "0 3 20 * *" | |
# https://ashishb.net/tech/common-pitfalls-of-github-actions/ | |
jobs: | |
build_and_deploy: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 | |
node-version: 20 | |
cache: "npm" | |
- name: Build | |
run: | | |
npm ci | |
cd ./functions && npm ci && cd .. | |
npm run test:unit | |
npm run build-staging | |
- name: Setup Google Auth | |
uses: "google-github-actions/auth@v2" | |
with: | |
credentials_json: "${{secrets.FIREBASE_SERVICE_ACCOUNT_DEV}}" | |
- name: Deploy | |
run: | | |
npm i -g firebase-tools@latest | |
firebase deploy --project staging --json |