chore: remove unused deps, bump torch #19
This file contains 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: "[BACKEND] Deploy Cloud Run" | |
on: | |
push: | |
branches: [main] | |
paths: | |
- backend/** | |
workflow_dispatch: {} | |
defaults: | |
run: | |
working-directory: backend | |
env: | |
SERVICE_NAME: kg1-backend | |
GCP_PROJECT: kg1-prod | |
GCP_PROJECT_ID: kg1-prod-405611 | |
GCP_REGION: europe-west1 | |
jobs: | |
deploy: | |
permissions: | |
contents: read | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup GCP Auth | |
uses: google-github-actions/auth@v2 | |
with: | |
project_id: ${{ env.GCP_PROJECT_ID }} | |
credentials_json: ${{ secrets.GCP_CREDENTIALS }} | |
- name: Setup GCP SDK | |
uses: google-github-actions/setup-gcloud@v2 | |
with: | |
project_id: ${{ env.GCP_PROJECT_ID }} | |
- name: Build Container on GCP | |
run: | | |
gcloud builds submit \ | |
--project ${{ env.GCP_PROJECT }} \ | |
--tag eu.gcr.io/${{ env.GCP_PROJECT }}/${{ env.SERVICE_NAME }} \ | |
--region ${{ env.GCP_REGION }} \ | |
--timeout 900 | |
- name: Deploy Container to GCP | |
run: | | |
gcloud run deploy ${{ env.SERVICE_NAME }} \ | |
--image eu.gcr.io/${{ env.GCP_PROJECT }}/${{ env.SERVICE_NAME }} \ | |
--allow-unauthenticated \ | |
--memory 2Gi \ | |
--max-instances 1 \ | |
--project ${{ env.GCP_PROJECT }} \ | |
--region ${{ env.GCP_REGION }} \ | |
--set-env-vars OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} \ | |
--set-env-vars SUPABASE_URL=${{ secrets.SUPABASE_URL }} \ | |
--set-env-vars SUPABASE_KEY=${{ secrets.SUPABASE_KEY }} \ | |
--set-env-vars TOKENIZERS_PARALLELISM=false |