{"id":22748837,"url":"https://github.com/apinstein/git-deployment","last_synced_at":"2025-09-02T02:34:06.135Z","repository":{"id":585962,"uuid":"219696","full_name":"apinstein/git-deployment","owner":"apinstein","description":"Capistrano recipe for a deployment workflow based on git tags","archived":false,"fork":false,"pushed_at":"2017-07-19T22:15:01.000Z","size":180,"stargazers_count":116,"open_issues_count":3,"forks_count":43,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-14T12:06:31.576Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apinstein.png","metadata":{"files":{"readme":"README.rdoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-06-05T19:20:19.000Z","updated_at":"2024-07-31T17:31:40.000Z","dependencies_parsed_at":"2022-07-17T00:30:38.311Z","dependency_job_id":null,"html_url":"https://github.com/apinstein/git-deployment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apinstein%2Fgit-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apinstein%2Fgit-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apinstein%2Fgit-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apinstein%2Fgit-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apinstein","download_url":"https://codeload.github.com/apinstein/git-deployment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248877986,"owners_count":21176243,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-11T03:36:00.165Z","updated_at":"2025-04-14T12:06:35.933Z","avatar_url":"https://github.com/apinstein.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"= gitflow: a Capistrano recipe for git deployment using tags in a multistage environment.\n\nThe best thing about this recipe is that there is almost nothing to learn -- your cap deploy process barely changes.\nGitflow simply adds some tagging/logging/workflow magic.\n\n    # BEFORE\n    $ cap deploy              # 'master' goes to staging\n    $ cap production deploy   # 'master' goes to production\n\n    # AFTER\n    $ cap deploy                                                          \n    # 'master' goes to staging; tag staging-YYYY-MM-DD.X created\n\n    $ cap production deploy\n    # deploys latest staging tag, or if last tag is a production tag then that, to production\n    # displays a commit log of what will be pushed to production, requests confirmation before deploying\n    # tag 'staging-YYYY-MM-DD-X' goes to production\n    # tag 'production-YYYY-MM-DD-X' created; points to staging-YYYY-MM-DD-X\n\n    # BONUS\n    $ cap gitflow:commit_log              \n    # displays a commit log pushed to staging\n    \n    $ cap production gitflow:commit_log   \n    # displays a commit log of what will be pushed to production\n\n== INSTALLATION\n\nFirst, install the gem:\n\n    gem install capistrano-gitflow\n\nThen update config/deploy.rb\n\n    require 'capistrano/ext/multistage'\n    require 'capistrano/gitflow' # needs to come after multistage\n\nMore info at: http://rubygems.org/gems/capistrano-gitflow\n\n== DETAILS\n\nAfter experimenting with several workflows for deployment in git, I've finally found one I really like.\n\n* You can push to staging at any time; every staging push is automatically tagged with a unique tag.\n* You can only push a staging tag to production. This helps to enforce QA of all pushes to production.\n\n=== PUSH TO STAGING\n\nWhenever you want to push the currently checked-out code to staging, just do:\n\n    cap staging deploy\n\ngitflow will automatically:\n\n* create a unique tag in the format of 'staging-YYYY-MM-DD.X'\n* configure multistage to use that tag for the deploy\n* push the code and tags to the remote \"origin\"\n* and run the normal deploy task for the staging stage.\n\n=== PUSH TO PRODUCTION:\n\nWhenever you want to push code to production, just do:\n\n    cap production deploy\n\ngitflow will automatically:\n\n* determine the last staging tag created, show a commit log of last-production-tag..last-staging-tag\n* (alternatively, specify the tag to push to production via `-s tag=staging-YYYY-MM-DD-X-user-description`\n* prompt for confirmation of deploy\n* alias the staging tag to a production tag like: production-2008-09-08.2\n* configure multistage to use that tag for the deploy\n* push the code and tags to the remote \"origin\"\n* and run the normal deploy task for the production stage.\n\n=== NOTES:\n\n* you may need to wipe out the cached-copy on the remote server that cap uses when switching to this workflow; I have seen situations where the cached copy cannot cleanly checkout to the new branch/tag. it's safe to try without wiping it out first, it will fail gracefully.\n* if your stages already have a \"set :branch, 'my-staging-branch'\" call in your configs, remove it. This workflow configures it automatically.\n\n== CREDIT\n\nOriginally created by Alan Pinstein.\n\nGemified and hacked by Josh Nichols.\n\n== LICENSE\n\nMIT licensed.\n\nCopyright (c) 2009-2011 Alan Pinstein \u003capinstein@mac.com\u003e\n\nCopyright (c) 2010-2011 Josh Nichols\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapinstein%2Fgit-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapinstein%2Fgit-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapinstein%2Fgit-deployment/lists"}