Skip to content

Commit

Permalink
PI-2373: Add consolidated documentation publisher action
Browse files Browse the repository at this point in the history
  • Loading branch information
mxco86 committed Oct 8, 2024
1 parent d3b8101 commit 876892e
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish HMPPS Integration API Documentation

on:
workflow_dispatch:
push:

jobs:
build:
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
working-directory: tech-docs
- 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
- name: Fetch API docs
run: mkdir -p openapi && curl -f localhost:8080/v3/api-docs -o openapi/api-docs.json
- 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

0 comments on commit 876892e

Please sign in to comment.