Skip to content

PI-2373: Add consolidated documentation publisher action #11

PI-2373: Add consolidated documentation publisher action

PI-2373: Add consolidated documentation publisher action #11

Workflow file for this run

name: Publish HMPPS Integration API Documentation
on:
workflow_dispatch:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- uses: gradle/actions/setup-gradle@v4
- name: Serve dependencies
run: make serve-dependencies
- name: Start service
run: |
./gradlew bootRun &
timeout 300 sh -c 'until curl -s localhost:8080/v3/api-docs; do sleep 5; done'
env:
SPRING_PROFILES_ACTIVE: local
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
working-directory: tech-docs
- name: Build
run: |
gem install middleman
bundle exec middleman build --verbose
working-directory: tech-docs
- name: Bundle OpenAPI specs
run: |
curl -sf localhost:8080/v3/api-docs -o api-docs.json
working-directory: tech-docs/build
- uses: actions/upload-artifact@v4
with:
path: tech-docs/build