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