Skip to content

feat: integrate Google Cloud Vision for image analysis on upload #9

feat: integrate Google Cloud Vision for image analysis on upload

feat: integrate Google Cloud Vision for image analysis on upload #9

Workflow file for this run

name: Deploy to Firebase
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: |
package-lock.json
functions/package-lock.json
# Build frontend (Vite -> hosting/)
- run: npm ci
- run: npm run build:frontend
# Build Cloud Functions (TypeScript -> functions/dist/)
- run: cd functions && npm ci
- run: cd functions && npm run build
# Install Firebase CLI
- run: npm install -g firebase-tools
# Authenticate with service account
- name: Auth
run: |
echo '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}' > /tmp/sa-key.json
export GOOGLE_APPLICATION_CREDENTIALS=/tmp/sa-key.json
echo "GOOGLE_APPLICATION_CREDENTIALS=/tmp/sa-key.json" >> $GITHUB_ENV
# Deploy hosting
- run: firebase deploy --only hosting --project static-10546
# Deploy functions + firestore rules
- run: firebase deploy --only functions:api,functions:imageHandler,firestore:rules --project static-10546