Skip to content

Latest commit

 

History

History
31 lines (26 loc) · 1.13 KB

README.md

File metadata and controls

31 lines (26 loc) · 1.13 KB

cPanel Connect To GitHub

  1. Create a Git Repository as public visibility.
  2. Push your entire website code to your Git Repository.
  3. Open cPanel
    • Go to GitTM Version Control
    • Click on New button
    • Enter your Git Repository Clone URL
    • Click on Create button
  4. Before deploying your code to cPanel, you must have .cpanel.yml file on your source code.
  5. In .cpanel.yml file
---
deployment:
  tasks:
    - export DEPLOYPATH=/home/user/public_html/subfolder
    - /bin/cp * $DEPLOYPATH
  • DEPLOYPATH=/home/user/public_html/subfolder - Your website full path and replace user with your cpanel username.
  • /bin/cp * - '*' means all file deploy in cPanel
  1. Again, push the source code of your website to the Git Repository.
  2. In Git Version Control
    • Click on Manage button, from the list
    • Click on Update button in Basic Information tab
    • Click on Update from Remote & Deploy Head Commit button in Pull or Deploy tab
  3. Finally, Check your website url.