Skip to content

amjadiqbal/cloudpanel-deploy-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

10 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CloudPanel Deploy Action ๐Ÿš€

Deploy to your CloudPanel sites instantly. This action automates the SSH connection, directory navigation, and execution of your deployment scripts.

๐Ÿ›  Setup in 2 Minutes

  1. Add Secrets: In your GitHub Repo, go to Settings > Secrets and add:
    • CLOUDPANEL_HOST: Your server IP address.
    • CLOUDPANEL_SSH_KEY: Your private SSH key.
  2. Install: Go to the Actions tab in your repo, search for "CloudPanel Deploy", and click Configure. This will auto-generate your workflow file.

โš™๏ธ Configuration (Inputs)

Input Description Required Default
host CloudPanel Server IP Yes -
user CloudPanel Site User Yes -
working_dir Path to site (e.g. /home/user/htdocs/site.com) Yes -
script Custom deployment commands No git pull origin main

How It Works (Rsync Method) ๐Ÿ› 

Unlike standard git-based tools, this action uses rsync to sync your code.

  • No Server-Side Git Required: You don't need to run git clone or git pull on your CloudPanel server.
  • Safe Merging: It copies new/updated files from GitHub and merges them into your server folder.
  • Non-Destructive: It will not delete existing files on your server (like user uploads or local logs) unless you explicitly configure it to do so.

Example Workflow

- name: CloudPanel Deploy
  uses: amjadiqbal/cloudpanel-deploy-action@v1.2.0
  with:
    host: ${{ secrets.CP_HOST }}
    user: 'my-site-user'
    key: ${{ secrets.CP_KEY }}
    working_dir: '/home/my-site-user/htdocs/://site.com'
    script: |
      npm install
      npm run build

Customizing Your Script

You can extend the script input to run any commands specific to your app:

- uses: amjadiqbal/cloudpanel-deploy-action@main
  with:
    host: ${{ secrets.CLOUDPANEL_HOST }}
    script: |
      git pull origin main
      composer install --no-dev
      php artisan migrate --force
      php artisan optimize

About

A GitHub Action to automate code deployment to CloudPanel hosting environments via SSH. specific for PHP, Node.js, and Python apps on CloudPanel.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors