In this step, you create a Cloud Run service to deploy the app from the
repository that you forked in the previous step. You also set up an automatic
Cloud Build trigger, so that the app is built and deployed to Google Cloud
whenever you push a new commit to the repository. In the Google Cloud console, navigate to Cloud Run. Click Create service. Select Continuously deploy from a repository. Click Set up with Cloud Build. In the Repository list, select the forked GitHub repository that you created
for your app. If your repository isn't listed, click Manage connected repositories.
While completing this step, do the following, if prompted: Authenticate to GitHub. Install Cloud Build on your GitHub account. If you're selecting a repository for the first time for use with
Cloud Build in your project, select the checkbox to agree to the terms of
use policy. Click Next. In the Build configuration section, enter the following details: Branch: The default branch is Build type: Click Dockerfile. Source location: Enter the following: Click Save. On the Create service page, enter the following details in the Configure section: Service name: Enter Authentication: Click Allow unauthenticated invocations. Service autoscaling: Set the Minimum number of instances to Click Container(s), volumes, networking, security. In the Revision autoscaling section, enter the following: Minimum number of instances: Enter Maximum number of instances: Enter Click Create. Optional: To test the app deployment to Cloud Run, do the following: On the Services page in Cloud Run, click the service name. On the Service details page, click the URL displayed next to the service name. Navigate to the Triggers page in Cloud Build. Click the name of your new trigger. Under Source, click to expand Show included and ignored files filters. In the Included files filter box, enter Click Save.Create a Cloud Run service with continuous build
^main$
. Don't update this./gemini/sample-apps/gemini-streamlit-cloudrun/Dockerfile
gemini-streamlit-cloudrun
.1
.
1
.3
.
Set up an automatic Cloud Build trigger
gemini-streamlit-cloudrun/**
.
Step 2: Create a Cloud Run service
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-23 UTC.