Skip to content

Commit

Permalink
Use firebase hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
sbutz committed Oct 19, 2023
1 parent 6eaa7a2 commit dd9a0d8
Show file tree
Hide file tree
Showing 9 changed files with 2,247 additions and 193 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/client-deploy-on-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POOLSCORE_1973 }}'
channelId: live
projectId: poolscore-1973
20 changes: 18 additions & 2 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- reopend

jobs:
client:
test:
runs-on: ubuntu-latest
env:
working-directory: ./client
Expand All @@ -25,4 +25,20 @@ jobs:
working-directory: ${{env.working-directory}}
- name: Run Tests
run: npm run test
working-directory: ${{env.working-directory}}
working-directory: ${{env.working-directory}}
preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
env:
working-directory: ./client
steps:
- uses: actions/checkout@v3
- name: 'Install Dependencies and build'
run: npm ci && npm run build
working-directory: ${{env.working-directory}}
- name: Deploy Preview
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_POOLSCORE_1973 }}'
projectId: poolscore-1973
2 changes: 1 addition & 1 deletion .github/workflows/firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- reopend

jobs:
firestore-rules:
test:
runs-on: ubuntu-latest
env:
working-directory: ./firestore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- reopend

jobs:
cloud-functions:
test:
runs-on: ubuntu-latest
env:
working-directory: ./functions
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
A pool billard score tracker built with React and Google
Cloud Platform.

Live Version: [butz.st/poolscore](https://butz.st/poolscore/game)
Live Version: [poolscore.butz.st](https://poolscore.butz.st/)

## Goal

Expand Down
Loading

0 comments on commit dd9a0d8

Please sign in to comment.