Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Github actions config
name: API Documentation
on:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
services:
db:
image: postgres:11
ports: ['5432:5432']
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7.1
- uses: actions/setup-node@v1
with:
node-version: '11.x'
- name: Install PostgreSQL 11 client
run: |
sudo apt-get -yqq install libpq-dev
- name: Build and run tests
env:
RAILS_ENV: test
DB_HOST: localhost
DB_USER: postgres
DB_PASS: postgres
run: |
gem install bundler:1.17.2
bundle install --jobs 4 --retry 3
bundle exec rake db:drop db:create db:schema:load
bundle exec rspec
npm install -g aglio
bundle exec rake docs:generate
aglio -i doc/api/index.apib --theme-template triple -o api_doc.html
aws s3 sync . s3://blog-api-docs --exclude "*" --include "api_doc.html"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.