Deploy to your CloudPanel sites instantly. This action automates the SSH connection, directory navigation, and execution of your deployment scripts.
- Add Secrets: In your GitHub Repo, go to
Settings > Secretsand add:CLOUDPANEL_HOST: Your server IP address.CLOUDPANEL_SSH_KEY: Your private SSH key.
- Install: Go to the Actions tab in your repo, search for "CloudPanel Deploy", and click Configure. This will auto-generate your workflow file.
| 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 |
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 cloneorgit pullon 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.
- 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 buildYou 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