Skip to content

GitHub Actions Setup Guide

This guide will help you configure GitHub Actions for automatic deployment to Oracle Cloud.

Go to your repository Settings → Secrets and variables → Actions and add:

ORACLE_SSH_KEY

Terminal window
# Copy your private SSH key content
cat ~/.ssh/oracle_key_correct

Paste the entire private key (including -----BEGIN... and -----END... lines)

ORACLE_HOST

79.72.87.238
  • Trigger: When you push changes to zitadel/ folder on main branch
  • Process:
    1. 🔍 Detects configuration changes
    2. 💾 Creates automatic backup
    3. 🚀 Deploys new configuration
    4. 🏥 Runs health checks
    5. 🆘 Auto-rollback if deployment fails
  • Trivy security scanning on every push
  • Secrets are never logged
  • SSH keys are temporarily created and destroyed
  • Automatic vulnerability detection
  • Automatic backup before every deployment
  • Database dump included
  • Keeps last 5 backups
  • One-click rollback capability

Go to Actions → Deploy Zitadel to Oracle Cloud → Run workflow

Edit zitadel/README.md and push to main branch:

Terminal window
echo "Test deployment at $(date)" >> zitadel/README.md
git add zitadel/README.md
git commit -m "Test GitOps deployment"
git push
  • Verify ORACLE_SSH_KEY contains the complete private key
  • Ensure ORACLE_HOST IP is correct
  • Check Oracle Cloud security rules allow SSH from GitHub Actions IPs
  • Check Zitadel logs: docker-compose logs zitadel
  • Verify all services are running: docker-compose ps
  • Manual rollback: Use latest backup in /home/ubuntu/zitadel-backups/
  • Ensure SSH key has correct permissions on Oracle Cloud
  • Verify Ubuntu user can access Docker commands
  • Services are updated with docker-compose up -d
  • Health checks ensure service availability
  • Automatic rollback prevents extended downtime

Ready for integration with:

  • Grafana Cloud (free tier)
  • Uptime Robot (free monitoring)
  • GitHub Security alerts

Extend for staging/production environments:

  • Add environment-specific secrets
  • Create separate workflows
  • Use environment protection rules
  1. ✅ Add the required secrets
  2. ✅ Test with a small change
  3. ✅ Set up monitoring (optional)
  4. ✅ Add team notifications (optional)

Your Zitadel deployment is now fully automated! 🎉