Skip to content

Commit

Permalink
feat: make target dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelDemey committed Jan 18, 2024
1 parent 2e39b8e commit 6d5356a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ jobs:
include:
- org: Devfest Lille
secret: DEVFEST_FIREBASE_TOKEN
function: 'functions:cms4devfestgdg'
function: "functions:cms4devfestgdg"
target: "default"
- org: Cloud Nord
secret: CLOUDNORD_FIREBASE_TOKEN
function: 'functions:cms4devfestcloudnord'
function: "functions:cms4devfestcloudnord"
target: "cloudnord"
steps:
- name: Checkout Repo
uses: actions/checkout@master
Expand All @@ -30,9 +32,9 @@ jobs:
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 }}
npx firebase-tools deploy -P ${{ matrix.target }} --only hosting
npx firebase-tools deploy -P ${{ matrix.target }} --only firestore:rules
npx firebase-tools deploy -P ${{ matrix.target }} --only functions:cms
npx firebase-tools deploy -P ${{ matrix.target }} --only ${{ matrix.function }}
env:
FIREBASE_TOKEN: ${{ secrets[matrix.secret] }}

0 comments on commit 6d5356a

Please sign in to comment.