Skip to content

Api deploy

Api deploy #12

Workflow file for this run

name: Api deploy test
on: pull_request
jobs:
deploy_api:
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SOONAVERSE_TEST }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: Build image
run: |
cp packages/api/Dockerfile .
gcloud builds submit --tag gcr.io/$GOOGLE_CLOUD_PROJECT/api
- name: Deploy
run: |
gcloud run deploy api \
--image gcr.io/$GOOGLE_CLOUD_PROJECT/api \
--min-instances=3
--memory=1Gi \
--cpu=1 \
--concurrency=1000 \
--allow-unauthenticated \
--timeout=600 \
--ingress=internal-and-cloud-load-balancing \
--region=us-central1