从GitHub自动部署到服务器 [英] Automatically Deploy From GitHub To Server On Push

查看:234
本文介绍了从GitHub自动部署到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个linux上的VPS,gitHub上的代码。当我们推送到gitHub时,我们如何设置,它也会自动推送到我们的linode服务器。我们在linode服务器上使用PHP。



谢谢。

解决方案

您可能希望使用 GitHub的接收后挂钩



总而言之,当有人推送到repo时,GitHub将POST到提供的URL。只需编写一个简短的PHP脚本,即可在您的线性VPS上运行,并在GitHub接收到POST时从其中拔出。


We have a VPS on linode, and code hosted on gitHub. How do we setup so when we push to gitHub, it also pushes automatically to our linode server. We are using PHP on the linode server.

Thanks.

解决方案

You probably want to use GitHub's post-receive hooks.

In summary, GitHub will POST to a supplied URL when someone pushes to the repo. Just write a short PHP script to run on your linode VPS and pull from GitHub when it receives said POST.

这篇关于从GitHub自动部署到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆