{"id":23629803,"url":"https://github.com/willworks/autodeployment","last_synced_at":"2025-11-08T03:30:34.372Z","repository":{"id":36842427,"uuid":"41149357","full_name":"willworks/autoDeployment","owner":"willworks","description":"Github Deployment Automation","archived":false,"fork":false,"pushed_at":"2015-09-29T14:13:27.000Z","size":168,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-28T01:18:14.660Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willworks.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}},"created_at":"2015-08-21T10:05:39.000Z","updated_at":"2019-08-18T16:50:16.000Z","dependencies_parsed_at":"2022-08-24T21:11:13.419Z","dependency_job_id":null,"html_url":"https://github.com/willworks/autoDeployment","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/willworks%2FautoDeployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2FautoDeployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2FautoDeployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willworks%2FautoDeployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willworks","download_url":"https://codeload.github.com/willworks/autoDeployment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239547420,"owners_count":19657148,"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":[],"created_at":"2024-12-28T01:18:17.538Z","updated_at":"2025-02-18T20:41:12.379Z","avatar_url":"https://github.com/willworks.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Github autoDeployment\nGithub Deployment Automation\n\nGithub为每个仓库(repository)都可以设置一个或多个自己专属的钩子，且每个钩子都可以设置独立的触发事件(Events)\n\n - push\t    仓库有push时触发(默认事件)\n - create\t当有分支或标签被创建时触发\n - delete\t当有分支或标签被删除时触发\n\n这里罗列webhooks的设置\n\n - Payloads URL：当事件被触发时，GitHub会将POST请求发送至改地址。\n - Content type：数据格式。\n - Secret： 用作给POST的body加密的字符串。采用HMAC算法。 HMAC hex digest of the body, using the secret as the key\n\n当有push代码的时候，Github会POST一个请求到设置的服务器地址(Payloads URL)\n\n服务器通过监测POST，校验参数，就可以执行shell脚本进行git pull更新代码\n\n\t\t#!/bin/bash\n\n\t\tPATH='./'\n\t\tUSER='root'\n\t\tUSERGROUP='root'\n\n\t\techo \"Start autoDeployment\"\n\t\tcd $PATH\n\t\techo \"pulling source code...\"\n\t\tgit reset --hard origin/master\n\t\tgit clean -f\n\t\tgit pull\n\t\tgit checkout master\n\t\techo \"changing permissions...\"\n\t\tchown -R $USER:$USERGROUP $PATH\n\t\techo \"Finished.\"\n\n - 服务器代码修改之后，需要重新启动，这部分尚未完成......","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillworks%2Fautodeployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwillworks%2Fautodeployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwillworks%2Fautodeployment/lists"}