{"id":20849428,"url":"https://github.com/munya-marinda/deploy-from-github-to-cpanel-using-cicd","last_synced_at":"2025-08-20T20:30:08.067Z","repository":{"id":262958519,"uuid":"888899068","full_name":"Munya-Marinda/deploy-from-github-to-cpanel-using-cicd","owner":"Munya-Marinda","description":"This repository demonstrates how to set up Continuous Integration and Continuous Deployment (CICD) to deploy your website from GitHub to a cPanel server automatically whenever changes are pushed to the 'main' branch.","archived":false,"fork":false,"pushed_at":"2024-11-15T08:17:44.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T12:17:47.259Z","etag":null,"topics":["cicd","cpanel","github-actions"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Munya-Marinda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-15T08:12:59.000Z","updated_at":"2024-11-15T08:18:44.000Z","dependencies_parsed_at":"2024-11-15T09:37:44.059Z","dependency_job_id":null,"html_url":"https://github.com/Munya-Marinda/deploy-from-github-to-cpanel-using-cicd","commit_stats":null,"previous_names":["munya-marinda/deploy-from-github-to-cpanel-using-cicd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Munya-Marinda/deploy-from-github-to-cpanel-using-cicd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Munya-Marinda%2Fdeploy-from-github-to-cpanel-using-cicd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Munya-Marinda%2Fdeploy-from-github-to-cpanel-using-cicd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Munya-Marinda%2Fdeploy-from-github-to-cpanel-using-cicd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Munya-Marinda%2Fdeploy-from-github-to-cpanel-using-cicd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Munya-Marinda","download_url":"https://codeload.github.com/Munya-Marinda/deploy-from-github-to-cpanel-using-cicd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Munya-Marinda%2Fdeploy-from-github-to-cpanel-using-cicd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271378680,"owners_count":24749192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cicd","cpanel","github-actions"],"created_at":"2024-11-18T03:04:56.489Z","updated_at":"2025-08-20T20:30:08.028Z","avatar_url":"https://github.com/Munya-Marinda.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy from GitHub to cPanel using CICD - Medium\n\nThis repository demonstrates how to set up Continuous Integration and Continuous Deployment (CICD) to deploy your website from GitHub to a cPanel server automatically whenever changes are pushed to the `main` branch.\n\n\nTUTORIAL: [Watch On YouTube](https://www.youtube.com/watch?v=W70fWpcHMzc\u0026t=650s)\n\n\n![Screenshot 2024-11-15 101229](https://github.com/user-attachments/assets/79c5e62f-b083-41e7-8ea9-f9f04baff6e7)\n\n\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Setup Instructions](#setup-instructions)\n- [Workflow Explanation](#workflow-explanation)\n- [Sample Code](#sample-code)\n- [Secrets Configuration](#secrets-configuration)\n- [License](#license)\n\n---\n\n## Overview\n\nThis project provides:\n\n- An example of using GitHub Actions for automating FTP deployments.\n- A simple HTML template to use as an example website.\n\n---\n\n## Setup Instructions\n\n### Step 1: Clone the Repository\n\nClone the repository to your local machine:\n\n```bash\ngit clone https://github.com/\u003cyour-username\u003e/deploy-from-github-to-cpanel-using-cicd.git\n```\n\n### Step 2: Add Your HTML Files\n\nReplace the `index.html` file in the repository with your actual website content.\n\n### Step 3: Set Up GitHub Secrets\n\n1. Navigate to your GitHub repository.\n2. Go to **Settings \u003e Secrets and variables \u003e Actions \u003e New repository secret**.\n3. Add the following secrets:\n   - `FTP_HOST`: The FTP host (e.g., `ftp.yourdomain.com`).\n   - `FTP_USERNAME`: The FTP username.\n   - `FTP_PASSWORD`: The FTP password.\n   - `FTP_DIR`: The directory on your server where the files should be uploaded (e.g., `/public_html`).\n\n### Step 4: Push Changes\n\nPush your code to the `main` branch, and GitHub Actions will handle the deployment automatically.\n\n---\n\n## Workflow Explanation\n\nThe GitHub Actions workflow (`.github/workflows/master.yml`) performs the following steps:\n\n1. **Trigger on Push**: The workflow is triggered whenever changes are pushed to the `main` branch.\n2. **Checkout Code**: Retrieves the latest code from the repository.\n3. **Sync Files**: Uses the `SamKirkland/FTP-Deploy-Action` to deploy files via FTP.\n\n### Workflow File\n\n```yaml\nname: Deploy Website\n\non:\n  push:\n    branches:\n      - main\n\njobs:\n  web-deploy:\n    name: Deploying to Production\n\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: Get latest code\n        uses: actions/checkout@v2\n\n      - name: Sync files\n        uses: SamKirkland/FTP-Deploy-Action@4.1.0\n        with:\n          server: ${{ secrets.FTP_HOST }}\n          username: ${{ secrets.FTP_USERNAME }}\n          password: ${{ secrets.FTP_PASSWORD }}\n          server-dir: ${{ secrets.FTP_DIR }}\n```\n\n---\n\n## Sample Code\n\n### `index.html`\n\nA basic HTML file to serve as the project's homepage:\n\n---\n\n## Secrets Configuration\n\nThe deployment relies on the following secrets:\n\n- `FTP_HOST`: FTP server address.\n- `FTP_USERNAME`: FTP login username.\n- `FTP_PASSWORD`: FTP login password.\n- `FTP_DIR`: Target directory on the FTP server.\n\nSet these in your repository under **Settings \u003e Secrets and variables \u003e Actions**.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. Feel free to use and modify it as needed.\n\n---\n\n## Author\n\nCreated by [Your Name](https://github.com/\u003cMunya-Marinda). Follow me on GitHub for more projects like this.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunya-marinda%2Fdeploy-from-github-to-cpanel-using-cicd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmunya-marinda%2Fdeploy-from-github-to-cpanel-using-cicd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmunya-marinda%2Fdeploy-from-github-to-cpanel-using-cicd/lists"}