Skip to main content

Overview

OpenReward integrates seamlessly with GitHub to provide continuous deployment for your environments. When you push code to a connected repository, OpenReward automatically:
  1. Builds your container image
  2. Deploys the new version
  3. Makes your environment available
Prerequisite: You must create an environment before connecting a GitHub repository. See Your First Environment for setup instructions.

Connecting a Repository

Via OpenReward Web UI

  1. Navigate to Environment Page
    • Go to https://openreward.ai/{username}/{environment-name}
  2. Connect GitHub Repository
    • Click “Connect GitHub” button
    • You will need to login to github, and grant read access to the desired repository
    • Select the repository from dropdown
  3. Configure Build Settings
    • Resource Allocation: CPU and memory for environment
    • Scaling settings: Minimum and maximum number of instances, and the number of sessions per instance
  4. Deploy
    • Click “Deploy” button
    • First build starts immediately

Deployment Flow

Automatic Deployment on Push

Once connected, deployments happen automatically:
1. Developer pushes to GitHub

2. GitHub webhook notifies OpenReward

3. OpenReward validates the push event

4. OpenReward builds container image

5. New version deployed automatically

6. Environment ready with new code

Monitoring Deployments

Deployment Status

Via Web UI:
  • Navigate to environment page
  • Click “Deployments” tab
  • See list of recent deployments with status:
    • Building: Build in progress
    • Deployed: Successfully deployed
    • Failed: Build or deployment failed
Deployment Information:
  • Git commit SHA and message
  • Triggered by (push or manual)
  • Build duration
  • Deployment timestamp

Build Logs

View in OpenReward:
  1. Go to “Deployments” tab
  2. Click on deployment
  3. View build logs inline

Environment Logs

View in OpenReward:
  1. Go to environment page
  2. Click “Logs” tab
  3. See real-time logs from your environment server

Resource Configuration

CPU and Memory: Configure via Web UI:
  • Choose appropriate size for your workload
  • Options like “1:2” (1 CPU, 2GB RAM)
Scaling Configuration:
  • Minimum instances: Scales to zero when idle (saves cost)
  • Maximum instances: Limit concurrent environment servers
  • Sessions per instance: How many agents per server

Branch and Tag Filtering

Deploy from Specific Branch:
  • Set in repository connection settings
  • Only pushes to this branch trigger deployments
  • Default: main
Deploy from Tags:
# Tag a commit
git tag v1.0.0
git push origin v1.0.0

# Triggers deployment if configured

Best Practices

Reduce image size and build time:
# Build stage
FROM python:3.11 AS builder
COPY requirements.txt .
RUN pip install --user -r requirements.txt

# Runtime stage
FROM python:3.11-slim
COPY --from=builder /root/.local /root/.local
COPY server.py .
ENV PATH=/root/.local/bin:$PATH
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8080"]
Catch issues early:
docker build -t test-image .
docker run -p 8080:8080 test-image
curl http://localhost:8080/health
Exclude unnecessary files from build context:
# .dockerignore
.git
.env
*.pyc
__pycache__
tests/
docs/
*.md
Faster builds, smaller images
  • Use slim base images (python:3.11-slim vs python:3.11)
  • Remove unnecessary dependencies
  • Use multi-stage builds
  • Clean up after installations
RUN pip install --no-cache-dir -r requirements.txt
Commit messages appear in deployment history:
# Good
git commit -m "Add caching to reduce response time"

# Bad
git commit -m "fix stuff"

Next Steps