paxha / cpanel-deploy

Deploy to cPanel through github actions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cPanel Deploy

Deploy to cPanel through GitHub Actions.

Getting Started

To deploy your code to cPanel using GitHub Actions, follow these steps:

  1. Create a workflow file (e.g., .github/workflows/cpanel-deployment.yml) in your repository.

  2. Add the following content to the workflow file:

name: cPanel Deployment

on:
  push:
    branches:
      - main

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to cPanel
        id: deploy
        uses: paxha/cpanel-deploy@v3
        with:
          host: 'https://serverxxx.web-hosting.com'
          port: '2083' # Optional. Don't change it unless you know what you're doing
          username: 'your-username' # Your cPanel username
          api_token: '${{ secrets.CPANEL_API_TOKEN }}' # Your cPanel API Token generated by above user.
          remote_path: '/home/your_username/repositories/your_repository'
          branch: main # Optional e.g 'main' or 'master'
      - name: echo deploy-duration
        run: echo "Deployment took ${{ steps.deploy.outputs.duration }} milliseconds"

About

Deploy to cPanel through github actions.


Languages

Language:JavaScript 100.0%