Skip to content

Commit

Permalink
Firebase deploy improvements (#1)
Browse files Browse the repository at this point in the history
* create new preview channel per push
* deploy to live channel per push to main branch
  • Loading branch information
oyisre authored Dec 8, 2021
1 parent f6a47dd commit dafa46e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/firebase-hosting-live-channel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Deploy commit to Firebase Hosting live channel
'on':
push:
branches:
- master
jobs:
build_and_deploy_to_live:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run build
- uses: w9jds/firebase-action@v2.0.0
with:
args: deploy --only hosting
env:
GCP_SA_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRED_CA431 }}'
14 changes: 14 additions & 0 deletions .github/workflows/firebase-hosting-preview-channel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Deploy commit to new Firebase Hosting preview channel
'on': push
jobs:
build_and_deploy_to_preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm install
- run: npm run build
- uses: w9jds/firebase-action@v2.0.0
with:
args: hosting:channel:deploy preview-$GITHUB_SHA --expires 14d
env:
GCP_SA_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_FRED_CA431 }}'
18 changes: 0 additions & 18 deletions .github/workflows/firebase-hosting-pull-request.yml

This file was deleted.

0 comments on commit dafa46e

Please sign in to comment.