Skip to content

Merge pull request #275 from ASCENDynamics-NFP/main #8

Merge pull request #275 from ASCENDynamics-NFP/main

Merge pull request #275 from ASCENDynamics-NFP/main #8

Workflow file for this run

# Nonprofit Social Networking Platform: Allowing Users and Organizations to Collaborate.
# Copyright (C) 2023 ASCENDynamics NFP
# This file is part of Nonprofit Social Networking Platform.
# Nonprofit Social Networking Platform is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Nonprofit Social Networking Platform is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
# You should have received a copy of the GNU Affero General Public License
# along with Nonprofit Social Networking Platform. If not, see <https://www.gnu.org/licenses/>.
name: Deploy to PROD Firebase
on:
push:
branches:
- prod
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Set environment variables
run: |
echo "FIREBASE_API_KEY=${{ secrets.PROD_FIREBASE_API_KEY }}" >> $GITHUB_ENV
echo "FIREBASE_AUTH_DOMAIN=${{ secrets.PROD_FIREBASE_AUTH_DOMAIN }}" >> $GITHUB_ENV
echo "FIREBASE_PROJECT_ID=${{ secrets.PROD_FIREBASE_PROJECT_ID }}" >> $GITHUB_ENV
echo "FIREBASE_STORAGE_BUCKET=${{ secrets.PROD_FIREBASE_STORAGE_BUCKET }}" >> $GITHUB_ENV
echo "FIREBASE_MESSAGING_SENDER_ID=${{ secrets.PROD_FIREBASE_MESSAGING_SENDER_ID }}" >> $GITHUB_ENV
echo "FIREBASE_APP_ID=${{ secrets.PROD_FIREBASE_APP_ID }}" >> $GITHUB_ENV
echo "FIREBASE_MEASUREMENT_ID=${{ secrets.PROD_FIREBASE_MEASUREMENT_ID }}" >> $GITHUB_ENV
- name: Build
run: npm run build
- name: Install Firebase CLI
run: npm install -g firebase-tools
- name: Install ESLint Config Google
run: npm install eslint-config-google
- name: Install function dependencies
run: |
cd functions
npm install
- name: Deploy to Firebase
env:
FIREBASE_TOKEN: ${{ secrets.PROD_FIREBASE_DEPLOY_TOKEN }}
run: firebase deploy --token $FIREBASE_TOKEN --project ${{ secrets.PROD_FIREBASE_PROJECT_ID }}