Deploy the agent to Google Cloud Run. Use when the user says "deploy", "push to gcp", "deploy to cloud run", "ship it", "deploy agent", "update production", "redeploy".
Deploy the Tripletex agent to GCP Cloud Run.
Show the user what changes will be deployed compared to the last deployment. We use a last-deploy git tag to track this.
# Show commits since last deploy
git log --oneline last-deploy..HEAD 2>/dev/null || echo "No last-deploy tag found — deploying all current changes"
# Show summary of changed files since last deploy
git diff --stat last-deploy..HEAD 2>/dev/null || git log --oneline -5
Present a concise summary to the user:
cd langgraph && uv run python -m pytest tests/ -x -q
If tests fail, stop and fix before deploying.
cp .env langgraph/.env 2>/dev/null || true
The Dockerfile copies .env* into the image so load_dotenv() can read it at runtime.
cd langgraph && gcloud run deploy tripletex-agent --source . --region europe-north1 --project ai-nm26osl-1731 --allow-unauthenticated --timeout 300 --memory 1Gi --quiet
This builds the Docker image via Cloud Build and deploys it. Takes 3-5 minutes.
rm -f langgraph/.env
curl -s https://tripletex-agent-2fquhrogvq-lz.a.run.app/health
Should return {"status":"ok"}.
After successful deploy, update the last-deploy tag to the current commit:
git tag -f last-deploy HEAD
Tell the user:
https://tripletex-agent-2fquhrogvq-lz.a.run.apphttps://tripletex-agent-2fquhrogvq-lz.a.run.apptimeout: 600000 on the Bash call)langgraph/Dockerfileai-nm26osl-1731, region: europe-north1