Skip to content

Merge pull request #6 from GDG-Lille/feature/github-actions-deploy-ma… #10

Merge pull request #6 from GDG-Lille/feature/github-actions-deploy-ma…

Merge pull request #6 from GDG-Lille/feature/github-actions-deploy-ma… #10

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- main
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
strategy:
matrix:
include:
- org: Devfest Lille
secret: DEVFEST_FIREBASE_TOKEN
function: 'functions:cms4devfestgdg'
- org: Cloud Nord
secret: CLOUDNORD_FIREBASE_TOKEN
function: 'functions:cms4devfestcloudnord'
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "20.x"
cache: "npm"
- name: Install Front
run: npm --prefix public install
- name: Build Back
run: npm --prefix functions install
- name: Deploy to Firebase for ${{ matrix.org }}
run: |
npx firebase-tools deploy -P default --only hosting
npx firebase-tools deploy -P default --only firestore:rules
npx firebase-tools deploy -P default --only functions:cms
npx firebase-tools deploy -P default --only ${{ matrix.function }}
env:
FIREBASE_TOKEN: ${{ secrets[matrix.secret] }}