Skip to content

Commit

Permalink
Merge pull request #46 from GoogleChromeLabs/fix-deploy-on-pr
Browse files Browse the repository at this point in the history
Regenerate Firebase actions
  • Loading branch information
taraojo authored Jul 29, 2024
2 parents 610a66b + eb1cc5f commit 769796e
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SHARED_STORAGE_DEMO }}'
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_SHARED_STORAGE_DEMO }}
channelId: live
projectId: shared-storage-demo
14 changes: 9 additions & 5 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
'on': pull_request
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SHARED_STORAGE_DEMO }}'
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_SHARED_STORAGE_DEMO }}
projectId: shared-storage-demo
24 changes: 20 additions & 4 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
{
"site": "shared-storage-demo",
"public": "sites/home",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
Expand All @@ -14,7 +18,11 @@
{
"site": "shared-storage-demo-publisher-a",
"public": "sites/publisher-a",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
Expand All @@ -25,7 +33,11 @@
{
"site": "shared-storage-demo-publisher-b",
"public": "sites/publisher-b",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
Expand All @@ -36,7 +48,11 @@
{
"site": "shared-storage-demo-content-producer",
"public": "sites/content-producer",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
Expand Down

0 comments on commit 769796e

Please sign in to comment.