Skip to content

Fix VAD issue on main.py #27

Fix VAD issue on main.py

Fix VAD issue on main.py #27

Workflow file for this run

name: Deploy Speech Models to Cloud RUN
# TODO: determine if changes to backend folder before pushing
on:
push:
# branches: [ "main", "development" ]
branches: "migrate-speed-models-to-gcp"
# paths:
# - 'backend/modal/**'
env:
SERVICE: models
REGION: us-central1
jobs:
deploy:
# environment: ${{ (github.ref == 'refs/heads/development' && 'development') || (github.ref == 'refs/heads/main' && 'prod') }}
environment: 'prod'
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
# To workaround "no space left on device" issue of GitHub-hosted runner
- 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 }}
- run: gcloud auth configure-docker
- name: Build and Push Docker image
run: |
docker build -t gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }} -f backend/modal/Dockerfile .
docker push gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}
# - name: Deploy to Cloud Run
# id: deploy
# uses: google-github-actions/deploy-cloudrun@v2
# with:
# service: ${{ env.SERVICE }}
# region: ${{ env.REGION }}
# image: gcr.io/${{ vars.GCP_PROJECT_ID }}/${{ env.SERVICE }}
# If required, use the Cloud Run url output in later steps
- name: Show Output
run: echo ${{ steps.deploy.outputs.url }}