Deploying an AI Agent with Docker, Cloud Run, and GitHub Actions
Recording available with Main or above.
We take a PydanticAI documentation agent with a Streamlit chat interface off your laptop and put it on the web. We start with the fastest option on Streamlit Community Cloud. Then we package the app with Docker, deploy it to Google Cloud Run, and automate tests and deploys with GitHub Actions.
Follow each step to go from a local Python project to an automated deployment pipeline that runs your test suite before updating the public service.
You can also use a coding agent to guide you through deployment, just like we did in this workshop. This walkthrough follows our decision to use Google Cloud Run, but you don't have to use GCP. If another cloud or platform fits your project better, talk to your coding agent, pick the option that works for you, and build it there.
Links
Useful resources for this workshop:
- Workshop recording
- Standalone deployment repository - standalone repository with the GitHub Actions CI/CD workflow enabled.
- End-to-End Agent Deployment - an earlier deployment workshop covering FastAPI, Docker, and Railway.
- Machine Learning Zoomcamp deployment module - a deeper introduction to Docker and serving Python apps.
- Data Engineering Zoomcamp Docker lesson - hands-on Docker fundamentals.
- Evidently documentation repository - the documentation corpus the agent indexes and searches.
The deployment pipeline
Every push to the main branch runs the test suite and builds a Docker image. GitHub Actions pushes that image to Artifact Registry and deploys a new Cloud Run revision:
We start from the documentation agent built in the AI Engineering Buildcamp. It uses PydanticAI with OpenAI gpt-4o-mini, indexes the Evidently docs with minsearch, logs traces to Logfire, and serves a chat UI through Streamlit.
First we publish the app to Streamlit Community Cloud to get a working URL in minutes. Next we write a Dockerfile and run the container locally, then deploy that image to Google Cloud Run with session affinity and a 60-minute WebSocket timeout. Finally we configure GitHub Actions with Workload Identity Federation so you can revoke local cloud credentials while keeping automated deploys working.
Upgrade to Basic to access this workshop
- Full workshop overview
- Complete page list
- Step-by-step tutorial
- Cancel anytime
Tutorial pages
More from AI Shipping Labs
AI System Design
In AI engineering interviews, you often get a system design round where you design an AI product on a whiteboard instead of writing code. We walk through two real system design pr…
November 30, 2026
Job Hunt and Career
Getting an AI engineering job takes more than learning tools. We use real job descriptions to choose portfolio projects, tailor a CV, and find people who can introduce us to emplo…
November 10, 2026
Tracing a FAQ agent with Langfuse
We add Langfuse tracing to a FAQ agent, then turn its traces into reviewed evaluation examples. We start with the existing FAQ application, add the Cloud integration and repeat th…
November 4, 2026