Skip to content

Commit

Permalink
firebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthonyp0329 committed Apr 25, 2024
1 parent 5cab374 commit aa8fcf2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
25 changes: 16 additions & 9 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
on:
push:
Expand All @@ -8,18 +11,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g firebase-tools

- name: Install and build frontend
- name: Install frontend dependencies
run: |
cd admin-portal-frontend/
npm ci
cd frontend/
npm ci
npm run build
- name: Install backend dependencies
run: |
cd backend/
touch .env
echo DATABASE_URL=${{ secrets.FIREBASE_TOKEN }}
echo DEV_PORT=3001
echo NODE_ENV=deployment
npm ci
- name: Deploy to Firebase
run: firebase deploy --only hosting,functions --token "${{ secrets.FIREBASE_TOKEN }}"
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_SIDELINE_SIDEKICK_APP }}
channelId: live
projectId: sideline-sidekick-app
5 changes: 4 additions & 1 deletion firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
"rewrites": [
{
"source": "/api/**",
"function": "backend"
"function": {
"functionId": "backend",
"pinTag": true
}
},
{
"source": "**",
Expand Down

0 comments on commit aa8fcf2

Please sign in to comment.