Auto Deploy Github Project into cPanel Via Actions
- The first thing you have to do is create your secrets within github. You need to create FTP_SERVER, FTP_USERNAME, FTP_PASSWORD. Please also make sure you add these to your cPanel

2. After that you need to create a cPanel deploy script so navigate to actions on the top of the repository. You will add the following code to the workflow.

name: Publish Website to CPanel
on:
push:
branches:
- master
jobs:
FTP-Deploy-Action:
name: FTP-Deploy-Action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.1.0
with:
fetch-depth: 2
- name: FTP-Deploy-Action
uses: SamKirkland/FTP-Deploy-Action@3.1.1
with:
ftp-server: ${{ secrets.FTP_SERVER }}
ftp-username: ${{ secrets.FTP_USERNAME }}
ftp-password: ${{ secrets.FTP_PASSWORD }}
Full Article: https://ridbay.medium.com/how-to-deploy-private-github-repositories-to-cpanel-ef5493df8d9f