Zactonz Git
v1.0.0Deploy GitHub repositories to cPanel accounts automatically, with webhooks or a manual sync.
How to use
Once the plugin is installed, account owners manage their repositories from cPanel. No further server-side setup is needed.
Add a repository#
- Open cPanel and find Zactonz Git under the Files group.
- Fill in the form:
- Repository name: a display name for the list.
- Clone URL: the GitHub repository URL, public or private.
- Branch: usually
mainormaster. - Repository path: where to deploy, relative to the account's home directory (for example
public_htmlorpublic_html/app). - Access token: required for private repositories. A GitHub personal access token with read access is enough.
- Enable auto sync: tick this if pushes to GitHub should deploy automatically.
- Click Save & Deploy.
The repository is cloned into the chosen path and appears under Configured repositories below the form.
Automatic deployment with a webhook#
- In Configured repositories, click Webhook next to the repository. A dialog shows its unique webhook URL; copy it.
- In GitHub open the repository's Settings › Webhooks › Add webhook.
- Paste the URL as the Payload URL.
- Set Content type to
application/json. - Choose Just the push event and save.
From then on every push to the configured branch triggers a git pull on the server. The Last sync column shows when the most recent deployment ran.
Manual deployment#
Click Sync now next to a repository to run git pull immediately. This works whether or not auto sync is enabled, and is the right choice for repositories where you want to control deployment timing.
Removing a repository#
Delete the entry from Configured repositories. The files already deployed to the target path are left in place; remove them from the File Manager if they are no longer wanted.