Skip to content

Commit

Permalink
Merge pull request #6 from GDG-Lille/feature/github-actions-deploy-ma…
Browse files Browse the repository at this point in the history
…trix

feat: use matrix config for deployments
  • Loading branch information
EmmanuelDemey authored Jan 18, 2024
2 parents f8b6e6a + 30c075f commit 2e39b8e
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ 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
Expand All @@ -19,19 +28,11 @@ jobs:
run: npm --prefix public install
- name: Build Back
run: npm --prefix functions install
- name: Deploy to Firebase for Devfest Lille
- 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 functions:cms4devfestgdg
npx firebase-tools deploy -P default --only ${{ matrix.function }}
env:
FIREBASE_TOKEN: ${{ secrets.DEVFEST_FIREBASE_TOKEN }}
- name: Deploy to Firebase for cloudnord
run: |
npx firebase-tools deploy -P cloudnord --only hosting
npx firebase-tools deploy -P cloudnord --only firestore:rules
npx firebase-tools deploy -P cloudnord --only functions:cms
npx firebase-tools deploy -P cloudnord --only functions:cms4devfestcloudnord
env:
FIREBASE_TOKEN: ${{ secrets.CLOUDNORD_FIREBASE_TOKEN }}
FIREBASE_TOKEN: ${{ secrets[matrix.secret] }}

0 comments on commit 2e39b8e

Please sign in to comment.