Overview
Upptime can be integrated into your CI/CD workflows to monitor deployments, validate environment health, and trigger status updates automatically. This guide covers common integration patterns and best practices.Integration Patterns
Upptime integrates with CI/CD pipelines through:- Workflow dispatch: Trigger checks on demand
- Repository dispatch: Trigger from external systems
- API integration: Use GitHub API to control Upptime
- Webhook notifications: React to deployment events
- Status checks: Validate deployments before promoting
Triggering Checks After Deployment
Using Workflow Dispatch
Trigger Upptime checks immediately after deployment:Enable workflow_dispatch in Upptime
The default Upptime workflows already support
workflow_dispatch. Verify in .github/workflows/uptime.yml:.github/workflows/uptime.yml
Trigger from deployment workflow
Add a step to your deployment workflow to trigger Upptime:
.github/workflows/deploy.yml
Using Repository Dispatch
For cross-repository triggering:Add repository_dispatch to Upptime workflow
Update
.github/workflows/uptime.yml:.github/workflows/uptime.yml
Environment-Specific Monitoring
Multi-Environment Setup
Monitor different environments with separate configurations:.upptimerc.yml
Dynamic Environment Checks
Create separate workflows for each environment:Post-Deployment Health Checks
Validate Deployment Success
Add health checks to your deployment workflow:.github/workflows/deploy.yml
Rollback on Health Check Failure
Automatically rollback deployments that fail health checks:.github/workflows/deploy-with-rollback.yml
Notifications Integration
Slack Notifications
Combine Upptime with Slack for deployment notifications:.upptimerc.yml
.github/workflows/deploy.yml
Custom Notifications
Send custom notifications via webhooks:.github/workflows/deploy.yml
Blue-Green Deployment Monitoring
Monitor both environments during blue-green deployments:Canary Deployment Monitoring
Monitor canary deployments with gradual traffic shifting:.github/workflows/canary-deploy.yml
Terraform/Infrastructure as Code Integration
Update Upptime configuration after infrastructure changes:.github/workflows/terraform-deploy.yml
Docker/Kubernetes Integration
Kubernetes Health Checks
Monitor Kubernetes service endpoints:.upptimerc.yml
Post-Deploy Validation
.github/workflows/k8s-deploy.yml
Best Practices
Wait After Deployment
Always wait 30-60 seconds after deployment before running health checks to allow services to initialize.
Retry Logic
Implement retry logic in health checks to handle temporary unavailability during deployment.
Multiple Checks
Run multiple health checks at different intervals to ensure stability.
Monitor Metrics
Track error rates, latency, and other metrics during and after deployment.
Troubleshooting
Workflow Not Triggering
- Verify PAT scope: Ensure your Personal Access Token has
workflowscope - Check repository name: Confirm the repository path is correct
- Review workflow name: Workflow name must match exactly (case-sensitive)
- Check permissions: Ensure the PAT has access to the target repository
Health Checks Failing
- Increase wait time: Services may need more time to initialize
- Check logs: Review application logs for startup errors
- Verify endpoints: Ensure health check endpoints are correct
- Test manually: Run health checks manually to isolate issues
Deployment Rollback Not Working
- Verify rollback logic: Test rollback procedure independently
- Check version tracking: Ensure version information is correctly captured
- Review deployment history: Confirm previous versions are available
Next steps
Workflow Configuration
Learn how to customize GitHub Actions workflows.
Notifications Setup
Configure notifications for deployment events.