CloudPloy

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.example.com
backend/ β†’ api.example.com
admin/ β†’ admin.example.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