-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 1.02 KB
/
api_deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 and deploy
run: |
cp packages/api/Dockerfile .
gcloud builds submit --tag gcr.io/$GOOGLE_CLOUD_PROJECT/api --suppress-logs
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