Skip to content

Commit b15dea5

Browse files
authored
Merge pull request #1014 from Dynamoid/ak/move-out-guides-from-readme
Move out documentation from README.md
2 parents 4ee8f82 + 2345b8f commit b15dea5

33 files changed

Lines changed: 1716 additions & 1609 deletions

.github/workflows/mdbook.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build-guides:
22+
runs-on: ubuntu-latest
23+
env:
24+
MDBOOK_VERSION: 0.5.2
25+
steps:
26+
- uses: actions/checkout@v4
27+
28+
- name: Install mdBook
29+
run: |
30+
wget https://github.com/rust-lang/mdBook/releases/download/v${MDBOOK_VERSION}/mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz
31+
tar xzf mdbook-v${MDBOOK_VERSION}-x86_64-unknown-linux-gnu.tar.gz
32+
33+
- name: Setup Pages
34+
id: pages
35+
uses: actions/configure-pages@v5
36+
37+
- name: Build with mdBook
38+
run: ./mdbook build
39+
40+
- name: Move into a dedicated subdirectory
41+
run: |
42+
mkdir -p combined-docs/guides
43+
cp -r build/ combined-docs/guides
44+
45+
- name: Upload static files as artifact
46+
id: deployment
47+
uses: actions/upload-pages-artifact@v3
48+
with:
49+
path: combined-docs
50+
51+
# Deployment job
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
runs-on: ubuntu-latest
57+
needs: build-guides
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ rdoc
1010
.yardoc
1111
/_yardoc/
1212

13+
# mdbook generated
14+
book
15+
1316
# bundler
1417
/.bundle/
1518

@@ -60,7 +63,6 @@ rdoc
6063
.tags
6164
.tags_sorted_by_file
6265

63-
/doc/
6466
/spec/reports/
6567
/tmp/
6668
/spec/DynamoDBLocal-latest/

.rubocop.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,6 @@ Style/TrailingCommaInArguments:
6565
Enabled: false
6666
Style/UnlessElse:
6767
Enabled: false
68-
Style/OneClassPerFile:
69-
Exclude:
70-
- 'README.md'
7168

7269
# We aren't so brave to tackle all these issues right now
7370
Layout/LineLength:
@@ -111,10 +108,20 @@ Naming/PredicateMethod:
111108
Security/YAMLLoad:
112109
Enabled: false
113110

111+
# disable some copes in documenting Markdown files
114112
Lint/EmptyClass:
115113
Exclude:
116114
- README.md
115+
- 'doc/**/*'
117116
Lint/EmptyBlock:
118117
Exclude:
119118
- README.md
120-
119+
- 'doc/**/*'
120+
Layout/ExtraSpacing:
121+
Exclude:
122+
- 'README.md'
123+
- 'doc/**/*'
124+
Style/OneClassPerFile:
125+
Exclude:
126+
- 'README.md'
127+
- 'doc/**/*'

CONTRIBUTING.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ installed and launched when you need either to run specs or to work in
1515
a REPL. See the [dynamodb-local](#dynamodb-local) section below for more details.
1616
1717
18-
## Specs
18+
## Running Specs
1919
2020
The specs are written with RSpec and are supposed to be run against
2121
_dynamodb-local_ only.
@@ -114,7 +114,10 @@ $ bin/console
114114
# dynamodb-local
115115

116116
_dynamodb-local_ is software provided by Amazon to emulate DynamoDB and
117-
run it locally. See [official documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html) to install it.
117+
run it locally. There are several ways to install it locally (see the [official documentation](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.html)).
118+
119+
120+
## Run dynamodb-local with Docker
118121

119122
To run _dynamodb-local_ using a Docker image use the following command
120123
(installs the Docker image automatically):
@@ -125,12 +128,43 @@ $ docker run --rm -d -p 8000:8000 amazon/dynamodb-local
125128

126129
A Docker Compose file is also provided.
127130

131+
132+
## Run dynamodb-local manually
133+
128134
To run _dynamodb-local_ as a JAR (that should be already downloaded)
129135
there are the following scripts to run and stop it:
130136

131137
- `bin/start_dynamodblocal`
132138
- `bin/stop_dynamodblocal`
133139

140+
Use the following workflow:
141+
142+
* First download and unpack the latest version of DynamoDB. We have a
143+
script that will do this for you if you use bash, and homebrew on a Mac.
144+
145+
```shell
146+
bin/setup
147+
```
148+
149+
* Start the local instance of DynamoDB to listen in ***8000*** port
150+
151+
```shell
152+
bin/start_dynamodblocal
153+
```
154+
155+
* and lastly, use `rake` to run the tests.
156+
157+
```shell
158+
rake
159+
```
160+
161+
* When you are done, remember to stop the local test instance of
162+
dynamodb
163+
164+
```shell
165+
bin/stop_dynamodblocal
166+
```
167+
134168

135169
## Pull Requests
136170

@@ -149,3 +183,10 @@ There are the following requirements for new Pull Requests:
149183
> necessary to blindly follow its recommendations if it hurts readability
150184
> or simplicity of code.
151185
186+
187+
## Related links
188+
189+
This documentation you may find useful:
190+
- <https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/welcome.html>
191+
- <https://docs.aws.amazon.com/sdk-for-ruby/v3/api/index.html>
192+

0 commit comments

Comments
 (0)