Merge pull request #78 from Hack4Impact-UMD/77-family-approval-fixes-… #68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy to Firebase | |
| env: | |
| GOOGLE_APPLICATION_CREDENTIALS: /tmp/credentials | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Write service account credentials | |
| run: echo '${{ secrets.FIREBASE_SERVICE_ACCT_KFK }}' > /tmp/credentials | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24" | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.33.0 | |
| - name: Install Firebase CLI | |
| run: npm install -g firebase-tools isolate-package get-or-throw@2.2.0 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Write apphosting.yaml | |
| env: | |
| FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | |
| run: | | |
| cat > apphosting.yaml << HEREDOC | |
| runConfig: | |
| minInstances: 0 | |
| scripts: | |
| runCommand: node app/.output/server/index.mjs | |
| env: | |
| - variable: GOOGLE_BUILDABLE | |
| value: app | |
| availability: | |
| - BUILD | |
| - variable: VITE_FIREBASE_API_KEY | |
| value: "$FIREBASE_API_KEY" | |
| availability: | |
| - BUILD | |
| - RUNTIME | |
| HEREDOC | |
| - name: Deploy | |
| run: firebase deploy |