Skip to content

passed project id explicitly #4

passed project id explicitly

passed project id explicitly #4

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:
- main
pull_request:
branches:
- main # Trigger workflow on pull requests targeting the main branch
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: Deploy to Firebase
env:
FIREBASE_TOKEN: ${{ secrets.PROD_FIREBASE_DEPLOY_TOKEN }}
run: firebase deploy --token $FIREBASE_TOKEN --project ${{ secrets.PROD_FIREBASE_PROJECT_ID }}