This repo is for the front end public api that lives here: https://cfpb.github.io/hmda-platform/
Have homebrew
and ruby
installed
Recommended to use rbenv and ruby-build from homebrew
, and specify the ruby version in .ruby-version
brew install rbenv ruby-build
RUBY_VERSION=2.4.1
ruby-build $RUBY_VERSION $HOME/.rbenv/versions/$RUBY_VERSION
Install bundler
gem install bundler
You can either do this locally, or with Vagrant:
# either run this to run locally
bundle install
bundle exec middleman server
# OR run this to run with vagrant
vagrant up
You can now see the docs at http://localhost:4567. Whoa! That was fast!
bundle exec middleman build --clean
- Build the included Dockerfile:
docker build -t=hmdaapidocs .
- Run the container:
docker run -i hmdaapidocs /bin/bash
- Find the container ID:
docker container ls | grep hmdaapidocs | awk '{split($0,a," "); print a[1]}'
- Copy the build folder from the docker container to the build directory for your local machine:
docker cp <containerID>:./app/build/. ./build
- Deploy the
./build
folder to the Dev site by pushing it's contents to thegh-pages
branch :./deploy.sh --push-only
- You can check the deployment status on the Actions tab in GitHub.
- Visit the Dev site and verify the updates are correct.
- Open the hmda-platform repo
- Checkout gh-pages branch:
git checkout gh-pages
- Branch ONLY contains the build output from docker
- Create a new branch and label it with gh-pages and what changes are being made: (i.e
git checkout -b gh-pages-added-file-proxy-api
) - Copy the contents from hmda-platform-api-docs
./build
into your newly created branch:cp -r ../hmda-platform-api-docs/build/* ./
- Add changes, commit them and then push the new branch:
git add --all && git commit -m "Change description" && git push
- Create a pull request to merge new branch into the
gh-pages
branch - Have the respective people review the changes
- Merge the approved pull request
- Visit the hmda-platform Actions page to check the deployment status
- Deploy action is triggered by any push or mergee into the
gh-pages
branch
- Deploy action is triggered by any push or mergee into the
- Verify new content was added to the Prod api docs
Slate - API Docs Generator