Skip to content

PI-2374: Add deployment stage to publishing workflow #57

PI-2374: Add deployment stage to publishing workflow

PI-2374: Add deployment stage to publishing workflow #57

Workflow file for this run

name: Publish HMPPS Integration API Documentation
on:
workflow_dispatch:
push:
jobs:
deploy-openapi:
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
- name: Bundle OpenAPI specs
run: |
mkdir openapi
curl -sf localhost:8080/v3/api-docs -o openapi/api-docs.json
working-directory: .
- name: Deploy OpenAPI
uses: JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c # v4.6.4
with:
folder: openapi
target-folder: openapi
build-docs:
runs-on: ubuntu-latest
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
working-directory: tech-docs
- name: Build Docs
run: |
gem install middleman
bundle exec middleman build --verbose
working-directory: tech-docs
- uses: actions/upload-artifact@v4
with:
name: documentation
path: tech-docs/build/
deploy-docs:
runs-on: ubuntu-latest
if: github.ref_name == 'main' || (github.event_name == 'workflow_dispatch')
needs:
- build

Check failure on line 58 in .github/workflows/publish-docs.yml

View workflow run for this annotation

GitHub Actions / Publish HMPPS Integration API Documentation

Invalid workflow file

The workflow is not valid. .github/workflows/publish-docs.yml (Line: 58, Col: 9): Job 'deploy-docs' depends on unknown job 'build'.
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: documentation
path: tech-docs-build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c # v4.6.4
with:
folder: tech-docs-build