Deployment
Stage
Adding your Pull Request (PR) branch to the stage branch
- Add "on stage" label to your PR.
- GitHub Bot will attempt to merge your PR branch into the stage branch.
- If a conflict exist between your PR branch and the stage branch you must resolve conflicts by manually. You will need to pull down the stage branch to your development container and merge the PR branch manually (alternatively you will need to reset the stage branch).
- Run
git checkout stage
- Run
git merge my-pr-branch-name
- Resolve conflicts between your PR branch and the stage branch
- Run
git push origin stage
- Run
Resetting the stage branch
From time to time the stage branch will need to be reset to main. This can happen for any number of reasons including but not limited to:
- Changes to stage branch were never merged to main e.g a PR was merged to stage then closed without merging to main.
- Conflicts were merged differently in stage than in main
In order to reset stage from your local environment follow these steps:
- Run
git push -d origin stage
- Run
git branch -D stage
(This may fail if you don’t have a local ‘stage’ branch) - Run
git checkout main
- Run
git pull origin main
- Run
git checkout -b stage
- Run
git push origin stage
- You will then need to merge into stage each PR's currently labelled "on stage" by running
git merge origin/branch-name
- Once you’ve merged all the required branches then run
git push origin stage