{"id":19218763,"url":"https://github.com/fadilxcoder/git-deploy","last_synced_at":"2025-11-13T22:05:52.891Z","repository":{"id":86245429,"uuid":"291527488","full_name":"fadilxcoder/git-deploy","owner":"fadilxcoder","description":"PHP Script to deploy app on a server","archived":false,"fork":false,"pushed_at":"2021-07-08T16:08:33.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"automated","last_synced_at":"2025-01-04T19:23:45.566Z","etag":null,"topics":["explanation","notes"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/fadilxcoder.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":"2020-08-30T18:22:15.000Z","updated_at":"2022-07-06T18:26:04.000Z","dependencies_parsed_at":"2023-03-13T09:16:03.519Z","dependency_job_id":null,"html_url":"https://github.com/fadilxcoder/git-deploy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fgit-deploy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fgit-deploy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fgit-deploy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fadilxcoder%2Fgit-deploy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fadilxcoder","download_url":"https://codeload.github.com/fadilxcoder/git-deploy/tar.gz/refs/heads/automated","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240292395,"owners_count":19778311,"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","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":["explanation","notes"],"created_at":"2024-11-09T14:28:00.674Z","updated_at":"2025-11-13T22:05:52.825Z","avatar_url":"https://github.com/fadilxcoder.png","language":"PHP","readme":"\n# Automated Deployment (private repo)\n\n### Notes\n\n- https://randomkeygen.com/ (Secure Password \u0026 Keygen Generator)\n- https://github.com/vicenteguerra/git-deploy (Source)\n- https://kamarada.github.io/en/2019/07/14/using-git-with-ssh-keys/ (Using Git with SSH keys)\n\n---\n\n### SSH (server)\n\n- Connect to you server by **SSH**\n- Generate a new SSH key pair\n- - `ssh-keygen -t rsa -b 4096 -C \"your_git_email_address@gmail.com\" `\n- - Avoid using default, enter full path of new key pair : `/home/your_user_name/.ssh/id_rsa_github`\n- - Passphrase is not obligatory\n- - `id_rsa_github` \u0026 `id_rsa_github.pub` will be created in **.ssh** directory\n- Add the private SSH key to the ssh-agent : `eval \"$(ssh-agent -s)\"`\n- - `ssh-add ~/.ssh/id_rsa_github`\n- - You may need to enter the passphrase to validate it.\n\n---\n\n### SSH Key to you account\n\n- Copy the content of `id_rsa_github.pub`\n- GOTO *github.com* \u003e *My Github settings* \u003e *SSH and GPG keys* **OR** *your_github_repo* \u003e *settings tab* \u003e *Deploy keys*\n- Add a title and the content of `id_rsa_github.pub`, tick allow write access\n\n---\n\n### Test SSH\n\n- You must follow this way of explicit configuration if you have **more than 1 key (2 and more)** in your **~/.ssh/** directory. \n- - Create `config` file in **.ssh**\n- - `Host github.com`\n- - `   IdentityFile ~/.ssh/id_rsa_github`\n- Run `ssh -T git@github.com`, Type **yes** if prompted\n\n---\n\n### App Setup \n\n- Include the `automated-deployment` directory into your application\n- Configure the `deploy.php` \u0026 remove unused files\n- Clone your app repo by **SSH** (This should be done manually the first time and codebase will automatically be deployed next time)\n- You may need to run some commands,\n- - `sudo chown -R yourusername:webserverusername your_directory_name/`\n- - `sudo chmod -R g+s your_directory_name/`\n- - `sudo chmod -R 775 your_directory_name/`\n\n---\n\n### Automated Deployment Setup \n\n- GOTO *your_github_repo* \u003e *settings tab* \u003e *Webhooks* \u003e *Add webhook*\n- - Payload URL : `https://\u003cyour_domain\u003e/\u003cpath_to_file\u003e/deploy.php`\n- - Content type : `application/json`\n- - Secret : `code found in deploy.php`\n- - Events trigger : `Just the push event`\n- - Active : :ballot_box_with_check:\n- You can check `deploy.log` OR `Github Webhooks` section to view Success / Errors response generated when deploying automatically\n\n---\n\n## WGET\n\n- `wget --header=\"Content-Type: application/json\" --post-data='{\"ref\":\"refs/heads/master\"}' 'http://\u003cyour_domain\u003e/\u003cpath_to_file\u003e/deploy.php?token=\u003cYOUR_TOKEN\u003e' `\n- Might face issue regarding TLS, Try to use **http** instead of **https**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fgit-deploy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffadilxcoder%2Fgit-deploy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffadilxcoder%2Fgit-deploy/lists"}