
GitHub Actions Workflows: - test.yml: PR validation with Docker build and health checks - deploy.yml: Automated build and deployment on master push - Multi-platform builds (amd64, arm64) with registry caching - SSH-based deployment with zero-downtime updates Production Infrastructure: - docker-compose.prod.yml: Production deployment configuration - deploy.sh: Automated deployment script with health checks - .env.production: Production environment template - README-DEPLOYMENT.md: Complete deployment documentation Features: - Automated testing on pull requests - Container registry publishing to GHCR - Health check validation - Image cleanup and optimization - Proper security with read-only containers Ready for automated deployments to claude.supported.systems\! 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2.3 KiB
2.3 KiB
Deployment Guide
CI/CD Pipeline Overview
This repository includes automated CI/CD for building and deploying the "How to Talk to Claude" guide.
Workflows
1. Test Build (.github/workflows/test.yml
)
- Trigger: Pull requests to
master
- Purpose: Validate Docker builds and basic functionality
- Tests: Docker build, container startup, health checks
2. Build and Deploy (.github/workflows/deploy.yml
)
- Trigger: Pushes to
master
branch - Purpose: Build multi-arch images and deploy to production
- Features:
- Multi-platform builds (amd64, arm64)
- Container registry publishing
- Automated deployment via SSH
Setup Requirements
Repository Secrets
Configure these secrets in your Git repository:
DEPLOY_HOST=your-server.com
DEPLOY_USER=deployment-user
DEPLOY_KEY=-----BEGIN OPENSSH PRIVATE KEY-----...
GITHUB_TOKEN=automatically-provided
Server Setup
On your deployment server:
-
Install Docker and Docker Compose
-
Create deployment directory:
mkdir -p /opt/how-to-claude cd /opt/how-to-claude
-
Copy production files:
# Copy docker-compose.prod.yml and .env.production # Update .env.production with actual values
-
Ensure Caddy network exists:
docker network create caddy
Manual Deployment
For manual deployment:
# Local build and test
docker build -t how-to-claude:latest .
docker run -p 8080:80 how-to-claude:latest
# Production deployment
./deploy.sh
Environment Files
.env.example
- Template for local development.env.production
- Production environment variablesdocker-compose.yml
- Local developmentdocker-compose.prod.yml
- Production deployment
Monitoring
The deployment includes:
- Health checks at
/health
endpoint - Container restart policies
- Image cleanup after deployment
Troubleshooting
Build fails:
- Check Astro build logs in CI
- Verify production config resolves plugin conflicts
Deployment fails:
- Verify SSH access and Docker permissions
- Check server disk space and network connectivity
- Review container logs:
docker logs how-to-claude
Site not accessible:
- Verify Caddy network configuration
- Check domain DNS settings
- Test health endpoint:
curl http://localhost:80/health