Back to Projects
CloudPanel Deploy Action — Automated CI/CD for CloudPanel

CloudPanel Deploy Action — Automated CI/CD for CloudPanel

A purpose-built GitHub Action that automates code deployment to CloudPanel-managed hosting environments via SSH. Supports PHP/Laravel, Node.js, and Python application stacks with configurable pre/post-deployment hooks, making CloudPanel deployments a first-class CI/CD pipeline step.

AI Summary

Transforms CloudPanel deployments from manual SSH sessions into repeatable, version-controlled GitHub Actions pipeline steps — authenticate once via GitHub Secrets and every push to your deployment branch triggers a fully automated, zero-configuration server deployment.

Overview

CloudPanel has become one of the most popular self-hosted server management panels among PHP and Laravel developers, offering a clean, free alternative to cPanel for managing VPS environments. However, automating deployments to CloudPanel has historically required custom shell scripts, manual Cron setups, or third-party deployment services. CloudPanel Deploy Action closes this gap with a purpose-built GitHub Action that integrates directly into any CI/CD pipeline.

The Problem It Solves

Without automated deployment, releasing code to a CloudPanel server means:

  • Manually SSH-ing into the server after every code change
  • Copying and pasting deployment commands that are easy to mistype
  • No deployment history, rollback capability, or audit trail through GitHub
  • No ability to gate deployments behind automated test suites or quality checks
  • Developer time wasted on repetitive, error-prone operational tasks

This GitHub Action transforms all of the above into a single, repeatable, version-controlled pipeline step that runs automatically on every push to your deployment branch.

Key Features

  • SSH-based deployment — connects securely to the target server using credentials stored in GitHub Secrets
  • PHP/Laravel support — runs composer install, php artisan migrate --force, php artisan config:cache, php artisan queue:restart
  • Node.js support — handles npm ci, npm run build, and PM2 process restarts
  • Python support — manages pip install, Gunicorn/uWSGI service restarts
  • Pre/post deployment hooks — run arbitrary commands before or after the core deployment step
  • Configurable deployment path — deploy to any directory on the CloudPanel server
  • GitHub Marketplace ready — installable directly from the GitHub Actions Marketplace with a single uses: line

Usage Example

name: Deploy to CloudPanel

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Deploy to CloudPanel
        uses: amjadiqbal/cloudpanel-deploy-action@v1
        with:
          host: ${{ secrets.DEPLOY_HOST }}
          username: ${{ secrets.DEPLOY_USER }}
          ssh-private-key: ${{ secrets.DEPLOY_KEY }}
          deploy-path: /home/mysite/htdocs/myapp
          app-type: laravel

Technology Stack

Shell (Bash), OpenSSH, GitHub Actions YAML. Compatible with Ubuntu, Debian, and any Linux distribution supported by CloudPanel. The action has no language runtime dependency — it operates purely through SSH remote command execution.

Architecture Highlights

The action wraps appleboy/ssh-action as its secure transport layer, adding CloudPanel-specific deployment intelligence: it knows which commands to run for each application type, handles service restarts through CloudPanel's clpctl CLI, and provides structured logging so deployment failures are visible directly in GitHub Actions' workflow output.

Practical Use Cases

  • Laravel applications deployed to CloudPanel-managed VPS or dedicated servers
  • WordPress sites requiring automated theme, plugin, or custom code deployments
  • Node.js APIs or Next.js applications hosted on CloudPanel servers
  • Teams replacing manual FTP/SFTP deployments with professional automated pipelines
  • Solo developers who want CI/CD-quality deployments without migrating to platform-specific hosting like Forge, Vapor, or Heroku

Source & License

Full configuration documentation and example workflow files on GitHub. Available on the GitHub Actions Marketplace.

Need something like this built?

Let's discuss your project requirements.

Get in Touch