简体   繁体   中英

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).

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.

从git 2.3开始,添加了一个名为“推送部署”的功能,您可以在其中搜索文档或在此处阅读

What type of websites are you making? WordPress, Drupal, ect? 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. This way you can deploy to private servers to "stage" your project/features for the client first before merging in to production .

stackahoy.io is built to do exactly this. It's free for 1 repo and unlimited branches. Some benefits to using Stackahoy are:

  • Maintain deployments for your git repositories in one place
  • Maintain static configuration files (stuff you keep in the .gitignore file)
  • Preform post-deployment scripts
  • Securely and instantly deploy your code based on the branch that was pushed and see real-time logs as it deploys.
  • Deploy to multiple servers at once (good for load-balanced applications)

Disclaimer: I work for Stackahoy and would be happy to answer any Q's.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM