Follow us on: facebook twitter linkedin

TECHNOLOGY

How to connect Github repository to cpanel?

Post by : john deo
Post date: 2023-11-15 11:14:30

Read time : 2 minute
Total views: 382 times
hero-img

Connect cPanel with github repository

For automatic deployment from github to cPanel need to follow these steps:

  1. Create a github repository.
  2. Add those three secrects under the settings option secrets field.
  3. Create a FTP account on cpanel.
  4. Deploy main.yml

These are the secrets:

  1. FTP_SERVER
  2. FTP_USERNAME
  3. FTP_PASSWORD

main.yml file contain those code

name: Deploy Private GitHub repository to cPanel
on:
 push:
   branches:
     - branch_name
jobs:
 FTP-Deploy-Action:
   name: 🎉 Deploy
   runs-on: ubuntu-latest

   steps:
     - name: TP-Deploy-Action
       uses: actions/checkout@v3
       with:
         fetch-depth: 2
     - name: main.yml
       uses: SamKirkland/FTP-Deploy-Action@4.3.3
       with:
         server: ${{ secrets.FTP_SERVER }}
         username: ${{ secrets.FTP_USERNAME }}
         password: ${{ secrets.FTP_PASSWORD }}
 

 

That is the process for connect cPanel with github repository.

Share by:

Keep exploring

Read what excites, achieves and moves us Read what excites, achieves and moves us