Skip to content

Commit 4e92a14

Browse files
committed
feat: implement Firebase multi-site hosting configuration
- Update firebase.json to support three hosting targets (dev, qa, prod) - Update .firebaserc to map targets to specific hosting sites - Modify firebase-deployment.yml to deploy to target-specific sites - Change FIREBASE_PROJECT_ID from secret to variable (addressing PR feedback) - Use rainbowrelax.web.app for production (simpler URL) Addresses PR comments: - Project ID moved from secrets to variables - Site URLs hardcoded in documentation and workflows - Added multi-site architecture explanation
1 parent 57c4f2b commit 4e92a14

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

.firebaserc

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
"targets": {
66
"rainbowrelax-46f61": {
77
"hosting": {
8-
"dev": ["rainbowrelax-dev"],
9-
"qa": ["rainbowrelax-qa"],
10-
"prod": ["rainbowrelax-prod"]
8+
"dev": [
9+
"rainbowrelax-dev"
10+
],
11+
"qa": [
12+
"rainbowrelax-qa"
13+
],
14+
"prod": [
15+
"rainbowrelax"
16+
]
1117
}
1218
}
1319
}
14-
}
20+
}

.github/workflows/firebase-deployment.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55
inputs:
66
environment:
7-
description: 'Deployment environment (develop, qa, live)'
7+
description: "Deployment environment (develop, qa, live)"
88
required: true
99
type: string
1010

@@ -15,16 +15,16 @@ jobs:
1515
build-and-deploy:
1616
runs-on: ubuntu-latest
1717
environment: ${{ inputs.environment }}
18-
18+
1919
steps:
2020
- name: Checkout Repository
2121
uses: actions/checkout@v4
2222

2323
- name: Setup Node.js
2424
uses: actions/setup-node@v4
2525
with:
26-
node-version: '20'
27-
cache: 'npm'
26+
node-version: "20"
27+
cache: "npm"
2828

2929
- name: Install Dependencies
3030
run: npm ci
@@ -62,7 +62,7 @@ jobs:
6262
elif [ "${{ inputs.environment }}" = "qa" ]; then
6363
echo "url=https://rainbowrelax-qa.web.app" >> $GITHUB_OUTPUT
6464
elif [ "${{ inputs.environment }}" = "live" ]; then
65-
echo "url=https://rainbowrelax-prod.web.app" >> $GITHUB_OUTPUT
65+
echo "url=https://rainbowrelax.web.app" >> $GITHUB_OUTPUT
6666
fi
6767
6868
- name: Comment Deployment URL
@@ -75,4 +75,4 @@ jobs:
7575
owner: context.repo.owner,
7676
repo: context.repo.repo,
7777
body: `🚀 **${{ inputs.environment }} Deployment Complete!**\n\n**URL:** ${{ steps.deployment-url.outputs.url }}\n\n**Environment:** ${{ inputs.environment }}\n**Commit:** ${{ github.sha }}`
78-
})
78+
})

0 commit comments

Comments
 (0)