Skip to content

Commit 3ae7063

Browse files
committed
INS-1201 Improve Stairstep Documentation
1 parent 850da65 commit 3ae7063

1 file changed

Lines changed: 93 additions & 11 deletions

File tree

README.md

Lines changed: 93 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,129 @@
11
# Stairstep
22

3-
Deploying
3+
📶 Stairstep is a Ruby gem that simplifies the process of deploying Rails applications to Heroku. It provides a streamlined workflow for deploying and promoting applications across different Heroku environments.
44

5-
## License
5+
### Table of Contents
66

7-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
7+
- [Setup](#setup)
8+
- [Prerequisites](#prerequisites)
9+
- [Installation](#installation)
10+
- [Configuration](#configuration)
11+
- [Usage](#usage)
12+
- [Code of Conduct](#code-of-conduct)
13+
- [License](#license)
14+
15+
## Setup
16+
17+
### Prerequisites
18+
19+
Before installing Stairstep, ensure you have:
20+
21+
1. Ruby 3.2.0 or higher installed
22+
2. Git installed and configured
23+
3. Heroku CLI installed and authenticated (`heroku login`)
24+
4. Heroku Builds plugin* installed: `heroku plugins:install @heroku-cli/heroku-builds`
25+
5. A Rails application with a Git repository
26+
6. Heroku applications and pipeline set up
27+
28+
### Installation
29+
30+
Add this line to your application's Gemfile:
31+
32+
```ruby
33+
gem 'stairstep'
34+
```
35+
36+
And then execute:
37+
38+
```bash
39+
$ bundle install
40+
```
41+
42+
Or install it yourself as:
43+
44+
```bash
45+
$ gem install stairstep
46+
```
47+
48+
### Configuration
49+
50+
You may add an **optional** `stairstep.yml` file in the application's `config/` directory to customize Stairstep's behavior.
51+
52+
#### Pipeline name
853

9-
## Configuration
54+
You may optionally specify the name of the pipeline for deploys. By default, this is the name of the GitHub repository.
1055

11-
You may add an optional `stairstep.yml` file in the application's config directory.
56+
#### App names
1257

13-
### Pipeline name
14-
You may optionally specify the name of the pipeline for deploys (see example). This will default to the name of the GitHub repository.
58+
You may optionally specify app names per remote. This will default to the hyphenated combination of the pipeline name and the remote name (e.g. syrup-demo).
1559

16-
### App names
17-
You may optionally specify app names per remote (see example). This will default to the hyphenated combination of the pipeline name and the remote name (e.g. syrup-demo).
60+
#### Hooks
1861

19-
### Hooks
2062
Top level config keys may be the name of a Heroku deploy hook. Each key within a hook is a Heroku CLI command. Each value is an array of parameters for that command.
2163

2264
- `before_deploy` Runs right before the deploy (during maintenance mode)
2365
- `after_deploy` Runs at the very end (after maintenance mode)
2466

25-
### Example
67+
#### Example Configuration
2668

2769
```yaml
2870
---
2971
pipeline: wibble-wobble
3072

3173
demo:
3274
app: wib-wob-demo
75+
staging:
76+
app: wib-wob-staging
3377
production:
3478
app: wibble-wobble-prod
3579
before_deploy:
3680
config:unset:
3781
- MINOR_VERSION
82+
config:set:
83+
- DEPLOY_TIME=`date +%s`
3884
after_deploy:
3985
run:
4086
- rails pusher:new_release rollbar:source_maps
87+
- rails db:seed:static
4188
```
4289
90+
## Usage
91+
92+
Stairstep provides two main commands: `deploy` and `promote`.
93+
94+
For information on available commands and options, use:
95+
96+
```bash
97+
$ stairstep --help
98+
$ stairstep deploy --help
99+
$ stairstep promote --help
100+
```
101+
102+
### Deploying to an Environment
103+
104+
To deploy your application to a specific Heroku environment:
105+
106+
```bash
107+
$ stairstep deploy ENVIRONMENT [options]
108+
```
109+
110+
For detailed `deploy` documentation, [see here](https://srpatx.atlassian.net/wiki/external/YjgzYzU0N2Q3OWYwNDMwNzgyODVlZTVmNjRmNDM1Zjk#deploy).
111+
112+
### Promoting Between Environments
113+
114+
To promote your application from one environment to another:
115+
116+
```bash
117+
$ stairstep promote ENVIRONMENT [options]
118+
```
119+
120+
For detailed `promote` documentation, [see here](https://srpatx.atlassian.net/wiki/external/YjgzYzU0N2Q3OWYwNDMwNzgyODVlZTVmNjRmNDM1Zjk#promote).
43121

44122
## Code of Conduct
45123

46124
Everyone interacting in the Stairstep project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](./CODE_OF_CONDUCT.md).
47125

126+
## License
127+
128+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
129+

0 commit comments

Comments
 (0)