用于将服务器集成到 cloud9 的 Github Commit 挂钩
我在一家主要使用 php 的小机构工作,我们正在寻找一种简单形式的版本控制。我遇到了cloud9,它看起来很完美,但我找不到将它与我们的服务器集成的方法。
然而,cloud9确实与github无缝集成,这让我想到有没有一种方法可以将github与我的服务器集成。现在我的印象是,您可以在提交时使用 svn 中的“post_commit”挂钩将文件 ftp 到服务器。是否有类似的功能,我可以将其与 github 存储库一起使用,以便在提交时自动将文件发送到服务器?或者我可以在我的服务器上安装任何软件来侦听 github 存储库中的任何更改,以便在发生任何更改时自行更新吗?
I work for a small agency that works mainly with php, and we were searching for a simple form of version control. I came across cloud9, and it seemed perfect, but I found no way to integrate it with our servers.
However, cloud9 does integrate seamlessly with github, which made me think is there a way to integrate github with my server. Now I'm under the impression that you can use a 'post_commit' hook in svn to ftp a file to a server when a commit is made. Is there a feature similar to these that I can use with a github repository to automatically send a file to a server when a commit is made? Or is there any software I can install on my server to listen for any changes in a github repository to update itself when any changed are made?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GitHub 提供了 post 接收挂钩,可用于执行您想要的操作。每当您推送到 GitHub 时,都会向预先配置的 URL 发送 POST 请求。 POST 消息的正文包含一个 JSON 结构,其中包含有关推送和所涉及提交的所有信息。
GitHub offers post receive hooks, which can be used to do what you want. Whenever you push to GitHub a POST request to a pre configured URL is sent. The body of the POST message contains a JSON structure with all the information about the push and the commits involved.