Skip to content

Commit c9f9c26

Browse files
committed
ci(workflows): [ci] deploy to firebase preview channel
- https://github.com/FirebaseExtended/action-hosting-deploy/tree/v0.10.0 - https://firebase.google.com/docs/hosting/test-preview-deploy Signed-off-by: Lexus Drumgold <unicornware@flexdevelopment.llc>
1 parent 3ad2564 commit c9f9c26

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.github/infrastructure.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ branches:
2727
- context: auto-review
2828
- context: commitlint
2929
- context: dependabot-dedupe
30+
- context: firebase
3031
- context: format
3132
- context: lint
3233
- context: spelling

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
1313
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#push
1414
# - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_dispatch
15+
# - https://github.com/FirebaseExtended/action-hosting-deploy
1516
# - https://github.com/actions/cache
1617
# - https://github.com/actions/cache/discussions/650
1718
# - https://github.com/actions/checkout
@@ -204,9 +205,41 @@ jobs:
204205
root: ${{ github.workspace }}
205206
treat_flagged_words_as_errors: true
206207
verbose: true
208+
firebase:
209+
needs:
210+
- commitlint
211+
- format
212+
- lint
213+
- preflight
214+
- spelling
215+
permissions:
216+
checks: write
217+
contents: read
218+
pull-requests: write
219+
runs-on: ubuntu-latest
220+
environment:
221+
name: firebase
222+
steps:
223+
- id: checkout
224+
name: Checkout ${{ env.REF_NAME }}
225+
uses: actions/checkout@v6.0.2
226+
with:
227+
persist-credentials: false
228+
ref: ${{ env.REF }}
229+
- id: deploy
230+
name: Deploy to Firebase Hosting
231+
uses: FirebaseExtended/action-hosting-deploy@v0.10.0
232+
with:
233+
channelId: ${{ env.SHA }}
234+
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLEXDEVELOPMENTLLC }}
235+
repoToken: ${{ secrets.GITHUB_TOKEN }}
236+
- id: url
237+
name: Print preview channel URL
238+
run: echo ${{ steps.deploy.outputs.details_url }}
207239
artifacts:
208240
needs:
209241
- commitlint
242+
- firebase
210243
- format
211244
- lint
212245
- preflight

0 commit comments

Comments
 (0)