{"id":21279082,"url":"https://github.com/cttricks/gittolive-sync","last_synced_at":"2026-04-12T22:05:03.750Z","repository":{"id":195184704,"uuid":"692345525","full_name":"cttricks/GitToLive-Sync","owner":"cttricks","description":"A simple PHP program allows you to automatically sync changes made to a GitHub repository's master branch to your live server. ","archived":false,"fork":false,"pushed_at":"2023-12-16T11:37:27.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T13:42:29.242Z","etag":null,"topics":["automation","github-actions","github-api","integration","server-sync"],"latest_commit_sha":null,"homepage":"https://cttricks.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cttricks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-09-16T07:37:43.000Z","updated_at":"2024-07-24T12:12:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"e88d6643-d447-4eb4-ac4c-82bd063c6c6f","html_url":"https://github.com/cttricks/GitToLive-Sync","commit_stats":null,"previous_names":["cttricks/gittolive-sync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cttricks/GitToLive-Sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cttricks%2FGitToLive-Sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cttricks%2FGitToLive-Sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cttricks%2FGitToLive-Sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cttricks%2FGitToLive-Sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cttricks","download_url":"https://codeload.github.com/cttricks/GitToLive-Sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cttricks%2FGitToLive-Sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281786273,"owners_count":26561315,"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-10-30T02:00:06.501Z","response_time":61,"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":["automation","github-actions","github-api","integration","server-sync"],"created_at":"2024-11-21T10:18:57.186Z","updated_at":"2025-10-30T10:08:29.407Z","avatar_url":"https://github.com/cttricks.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Repo to Live Server Sync\n\n![GitToLive Sync Banner](https://cttricks.com/pub/GitToLive-Sync2.jpg)\n\nThis simple PHP program allows you to automatically sync changes made to a GitHub repository's master branch with your live server. Please note that this project is intended for educational purposes and is not recommended for production use. Use it at your own risk.\n\n## Prerequisites\nBefore setting up the sync, make sure you have the following:\n1. A web server where your live website/app is hosted.\n2. PHP support on your server.\n\n## Setup\nFollow these steps to set up the GitHub Repo to Live Server Sync:\n**Download this repository:** Clone or download this repository to your local machine.\n\n**Create a `git` folder:** Create a folder named `git` in the root directory of your live website/app on your server.\n\n**Upload `callback.php`:** Upload the `callback.php` file from this repository to the `git` folder on your server.\n\n**Configure Webhook:**\n- In your GitHub repository, go to **Settings \u003e Webhooks**.\n- Click on \"Add webhook.\"\n- Set the Payload URL to your server's URL followed by `/git/callback.php`. It should be something like `https://yoursite.com/git/callback.php`.\n- Select \"Content type\" as `application/json`.\n- Set Secret to any alphanumeric value of your choice. It should be something like `cttricksgitsecretkey01`. Save it somewere for later use.\n- Choose event \"Just the `push` event\" for changes to the master branch.\n- Click \"Add webhook.\"\n\n**Generate a Personal Access Token:** You'll need a GitHub Personal Access Token to get the file contant to from github to sync on on your server. Follow the [GitHub documentation](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token) to generate a token with at least the \"`repo`\" scope.\n\n![Personal Access Token Steps](https://cttricks.com/pub/GitToLive-Sync1.jpg)\n\nNote that here we have to define repo scopes only.\n\n**Configure `callback.php`:** Open the `callback.php` file and update \n- GitHub Personal Access Token \n- Secrect that you entered while creating the webhook.\n- User Name\n- Repository title\n\nIn order to get the **User Name** and **Repository title** you can visit your github repository. On address bar you'll find URL like this, `https://github.com/cttricks/GitToLive-Sync`, Here `cttricks` is the username, and `GitToLive-Sync` is the repository name.\n\nWe are all set now! Make a change and push it to your repository \u0026 check the change on your server.\n\n## Contributing\n\nContributions are welcome! If you'd like to contribute to this project, follow these steps:\n\n1. Fork the repository.\n2. Make your changes and improvements.\n3. Create a pull request (PR) to the `main` branch of this repository.\n4. Describe your changes and why they should be merged.\n\n## Disclaimer\n\nThis project is a fun experiment and should not be used in a production environment without proper testing and security measures. Use it responsibly and at your own risk.\n\n---\n\nFeel free to reach out if you have any questions or encounter issues during setup. Happy syncing!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcttricks%2Fgittolive-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcttricks%2Fgittolive-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcttricks%2Fgittolive-sync/lists"}