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