All Tags

Tag

github-actions

1 item tagged with "github-actions"

Event

Deploying an AI Agent with Docker, Cloud Run, and GitHub Actions

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.

Dec 1, 2026