[英]Deploying websites with git (or generally: deployment workflow)
So I do create websites since some years already but I never cared about a good workflow. 因此,自几年以来,我确实创建了网站,但我从不关心良好的工作流程。 So I did bad things like working on the production server etc.
所以我做了坏事,例如在生产服务器上工作等等。
I want to improve all that and so I came across git and tools like wordmove (for wordpress). 我想改善所有这些,因此遇到了git和诸如wordmove(用于wordpress)之类的工具。
I tried to visualize what I want or what I think could work: workflow visualization 我试图可视化我想要的东西或我认为可以工作的东西: 工作流程可视化
Now I think something there is "wrong" or "not so good" and can be done better but I dont really know what or how to do it. 现在,我认为有些东西“错”或“不太好”,可以做得更好,但我真的不知道该怎么做或如何做。
So I have my local machine where I develop, then I have a bitbucket repository, a staging server to show the customer the current status and a production server which is the live server of the customer. 因此,我有要开发的本地计算机,然后有一个位桶存储库,一个向客户显示当前状态的登台服务器,以及一个生产服务器,它是客户的实时服务器。
I'd appreciate some help :P How it can be understood. 我将不胜感激:P如何理解。
从git 2.3开始,添加了一个名为“推送部署”的功能,您可以在其中搜索文档或在此处阅读
What type of websites are you making? 您正在制作哪种类型的网站? WordPress, Drupal, ect?
WordPress,Drupal等? It looks like you're on the right track.
看来您在正确的轨道上。
As that diagram shows, I'd recommend creating a development
, staging
, and production
branch for each project and setting up a webhook for the repo that listens for pushes and deploys (and builds) accordingly. 如该图所示,我建议为每个项目创建一个
development
, staging
和production
分支,并为回购协议建立一个Webhook,以监听相应的推送和部署(和构建)。 This way you can deploy to private servers to "stage" your project/features for the client first before merging in to production
. 这样,您可以部署到专用服务器,以便在合并到
production
之前先为客户端“暂存”您的项目/功能。
stackahoy.io is built to do exactly this. stackahoy.io正是为了做到这一点而构建的。 It's free for 1 repo and unlimited branches.
它免费提供1个回购和无限分支。 Some benefits to using Stackahoy are:
使用Stackahoy的一些好处是:
Disclaimer: I work for Stackahoy and would be happy to answer any Q's. 免责声明:我为Stackahoy工作,很乐意回答任何Q。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.