fix(desktop): proxy ElevenLabs TTS through backend with per-user rate… #34
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: Auto Deploy Desktop Backend to Development | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'desktop/Backend-Rust/**' | |
| workflow_dispatch: | |
| env: | |
| SERVICE: desktop-backend | |
| REGION: us-central1 | |
| jobs: | |
| deploy: | |
| environment: development | |
| permissions: | |
| contents: 'read' | |
| id-token: 'write' | |
| runs-on: ubuntu-latest-m | |
| steps: | |
| - name: Delete huge unnecessary tools folder | |
| run: rm -rf /opt/hostedtoolcache | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Google Auth | |
| id: auth | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| credentials_json: ${{ secrets.GCP_CREDENTIALS }} | |
| - name: Login to GCR | |
| run: gcloud auth configure-docker | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Google Service Account | |
| run: echo "${{ secrets.GCP_SERVICE_ACCOUNT }}" | base64 -d > ./desktop/Backend-Rust/google-credentials.json | |
| - name: Build and Push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: ./desktop/Backend-Rust | |
| file: ./desktop/Backend-Rust/Dockerfile | |
| push: true | |
| tags: gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}:latest | |
| cache-from: type=registry,ref=gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}:buildcache | |
| cache-to: type=registry,ref=gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}:buildcache,mode=max | |
| - name: Deploy desktop-backend to Cloud Run | |
| uses: google-github-actions/deploy-cloudrun@v2 | |
| with: | |
| service: ${{ env.SERVICE }} | |
| region: ${{ env.REGION }} | |
| image: gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }} | |
| flags: '--allow-unauthenticated' | |
| env_vars: | | |
| FIREBASE_PROJECT_ID=based-hardware | |
| GOOGLE_APPLICATION_CREDENTIALS=/app/google-credentials.json | |
| DISABLE_ELEVENLABS_KEY_RESPONSE=false | |
| secrets: | | |
| GEMINI_API_KEY=GEMINI_API_KEY:latest | |
| ENCRYPTION_SECRET=ENCRYPTION_SECRET:latest | |
| REDIS_DB_PASSWORD=REDIS_DB_PASSWORD:latest | |
| FIREBASE_API_KEY=FIREBASE_API_KEY:latest | |
| PINECONE_API_KEY=PINECONE_API_KEY:latest | |
| REDIS_DB_HOST=REDIS_DB_HOST:latest | |
| REDIS_DB_PORT=REDIS_DB_PORT:latest | |
| PINECONE_HOST=PINECONE_HOST:latest | |
| DEEPGRAM_API_KEY=DESKTOP_DEEPGRAM_API_KEY:latest | |
| ANTHROPIC_API_KEY=DESKTOP_ANTHROPIC_API_KEY:latest | |
| GOOGLE_CALENDAR_API_KEY=DESKTOP_GOOGLE_CALENDAR_API_KEY:latest | |
| ELEVENLABS_API_KEY=DESKTOP_ELEVENLABS_API_KEY:latest | |
| - name: Show Output | |
| run: echo "Desktop backend deployed to development environment" |