If your code already lives on GitHub, cPanel's built-in Git Version Control tool can pull from it directly, and with a webhook attached, every push to your default branch deploys automatically without you doing anything from your end.
Create the repository in cPanel
Open Files → Git™ Version Control → Create, paste your GitHub repository's clone URL, and set the deployment path (usually public_html or a subdirectory).
Copy the deployment webhook URL
Once created, open the repository in cPanel and copy the Pull or Deploy webhook URL it generates.
Add the webhook on GitHub
In your repository's Settings → Webhooks → Add webhook, paste the URL, set content type to application/json, and choose 'just the push event'.
Push and confirm
Push a commit to your default branch, then check the webhook's Recent Deliveries tab on GitHub for a 200 response, and confirm the change shows up on your site.
Private repositories
For a private repo, cPanel needs a deploy key instead of a plain HTTPS URL. Generate one the same way as in Set up SSH key-based authentication, then add the public half as a read-only deploy key under the GitHub repo's Settings → Deploy keys.