Heroku + Github deployment strategies

前端 未结 4 2130
独厮守ぢ
独厮守ぢ 2021-02-13 06:05

I am working on a web app, hosting the source code on Github and running the app on Heroku. Everything works fine, but I have on issue I can\'t wrap my head around. Before the d

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-13 06:49

    It is a bit confusing because:

    • your dev and production represent environments, and are directories with generated content:
      They shouldn't be in a VCS, but automatically produced by a script which would recognize the environment in which it is running, and create the right directory accordingly.

    • the dev and production mentioned in the article you are referring to "Deploying multiple environments on Heroku (while still hosting code on Github)" represent promotion stages, and are branches.

    Using branches is good, only for isolating code variations (in said branches), not for storing release generated code.
    Your particular release management issue (ie generating the right delivery) should be managed by a script (which can be version-controlled alongside your code), and use as a hook, for instance, to generate and deploy the right set of codes at the right place.

提交回复
热议问题