This article describes fetching website files from GitHub into a cPanel-managed repository and deploying them through cPanel’s controls.
The procedure below is manual pull deployment. A .cpanel.yml file does not make GitHub updates automatically deploy to cPanel. Automatic push deployment needs a separately configured workflow that pushes to the cPanel-managed repository.
Prepare the deployment
Back up the destination and test outside the live site’s document root first. Obtain repository access, including the required SSH authentication for a private repository. Keep the repository itself outside the public document root.
Commit a .cpanel.yml file at the repository root. For a simple repository containing index.html and style.css, an example is:
---
deployment:
tasks:
- export DEPLOYPATH=/home/exampleuser/public_html/
- /bin/cp index.html "$DEPLOYPATH"
- /bin/cp style.css "$DEPLOYPATH"Replace the username, destination and file list. Copy only required public website files, not editor configuration, credentials or the whole repository indiscriminately. These tasks can overwrite destination files.
Clone and deploy manually
-
Open Files > Git Version Control and select Create.

-
Enter the GitHub clone URL, repository path and name, then create the repository.

-
Select Manage > Pull or Deploy.
-
Select Update from Remote, check the intended revision, then select Deploy HEAD Commit.

The checked-in deployment file, a branch and a clean working tree are required. Check the result and website after deployment. Repeat the update and deploy controls for future GitHub changes; they are not automatic.