GitHub Actions CI/CD Pipeline
Automate your deployments with GitHub Actions. Test, build, and deploy to CloudPloy with every push.
5-Minute Setup
1. Add CloudPloy Deploy Action
# .github/workflows/deploy.yml
name: Deploy to CloudPloy
on:
push:
branches: [main, production]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cloudploy/deploy-action@v1
with:
api-key: ${{ secrets.CLOUDPLOY_API_KEY }}
app-name: my-app
environment: ${{ github.ref_name }} Production-Ready Workflows
Laravel CI/CD Pipeline
name: Laravel CI/CD
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: testing
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping"
steps:
- uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: mbstring, pdo_mysql
- name: Install Dependencies
run: composer install --no-progress
- name: Run Tests
run: php artisan test
- name: Run Static Analysis
run: ./vendor/bin/phpstan analyse
deploy:
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Deploy to CloudPloy
uses: cloudploy/deploy-action@v1
with:
api-key: ${{ secrets.CLOUDPLOY_API_KEY }}
app-name: laravel-app
pre-deploy: |
php artisan migrate --force
php artisan config:cache
php artisan route:cache Node.js/React Pipeline
name: Node.js CI/CD
on:
push:
branches: [main, staging]
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'
- name: Install & Build
run: |
npm ci
npm run build
npm test
- name: Upload Build Artifacts
uses: actions/upload-artifact@v3
with:
name: build-files
path: dist/
deploy:
needs: build-test
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: build-files
- name: Deploy to CloudPloy
uses: cloudploy/deploy-action@v1
with:
api-key: ${{ secrets.CLOUDPLOY_API_KEY }}
app-name: react-app
environment: ${{ github.ref_name == 'main' && 'production' || 'staging' }} GitHub Actions + CloudPloy Features
🚀 Deployment Features
- ✓ Zero-downtime deployments
- ✓ Automatic rollback on failure
- ✓ Blue-green deployments
- ✓ Canary releases
- ✓ Environment-specific configs
🔧 CI/CD Capabilities
- ✓ Parallel test execution
- ✓ Matrix builds
- ✓ Dependency caching
- ✓ Secret management
- ✓ Artifact storage
📊 Monitoring & Alerts
- ✓ Deployment notifications
- ✓ Performance metrics
- ✓ Error tracking
- ✓ Slack/Discord integration
- ✓ Custom webhooks
🔐 Security
- ✓ Encrypted secrets
- ✓ OIDC authentication
- ✓ Vulnerability scanning
- ✓ SAST/DAST integration
- ✓ Compliance checks
Advanced Deployment Patterns
🔄 Multi-Environment
Deploy to dev, staging, and production with environment-specific configurations.
main → production
develop → staging
feature/* → preview
🎯 Monorepo Support
Deploy multiple apps from a single repository with path filtering.
frontend/ → app.cloudploy.com
backend/ → api.cloudploy.com
admin/ → admin.cloudploy.com
⚡ Preview Deployments
Auto-deploy PR branches for testing and review.
PR #123 → pr-123.preview.cloudploy.com
Best Practices
✅ Do's
- • Use environment secrets for sensitive data
- • Cache dependencies for faster builds
- • Run tests before deployment
- • Use deployment environments
- • Set up status checks
- • Monitor deployment metrics
❌ Don'ts
- • Don't hardcode API keys
- • Don't skip tests in production
- • Don't deploy directly to main
- • Don't ignore failed deployments
- • Don't forget rollback plans
- • Don't neglect monitoring
Automate Your Deployments Today
Set up GitHub Actions CI/CD pipeline in minutes. Deploy with confidence.
10,000 free build minutes • Unlimited deployments • No credit card required