- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·25 lines (17 loc) · 562 Bytes
/
deploy.sh
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
#!/bin/bash
# Purpose: To deploy the App to Cloud Run.
# Check if correct parameters were provided
if [ "$#"-ne 2 ];then
echo"Error: Invalid number of arguments."
echo"Usage: $0 <PROJECT> <LOCATION>"
exit 1
fi
# Google Cloud Project
PROJECT=$1
# Google Cloud Region
LOCATION=$2
echo"Deployment with parameters:"
echo"Project: $PROJECT"
echo"Location: $LOCATION"
# Depolying app from source code
sudo ~/google-cloud-sdk/bin/gcloud run deploy gemini-ai-assistant --source . --region=$LOCATION --project=$PROJECT --allow-unauthenticated