Skip to content

Commit d288d7c

Browse files
committed
PI-2374: Add deployment stage to publishing workflow
1 parent ea62141 commit d288d7c

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

.github/workflows/publish-docs.yml

+25-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,31 @@ jobs:
3434
working-directory: tech-docs
3535
- name: Bundle OpenAPI specs
3636
run: |
37-
curl -sf localhost:8080/v3/api-docs -o api-docs.json
37+
mkdir openapi
38+
curl -sf localhost:8080/v3/api-docs -o openapi/api-docs.json
3839
working-directory: tech-docs/build
3940
- uses: actions/upload-artifact@v4
4041
with:
41-
path: tech-docs/build
42+
name: documentation
43+
path: tech-docs/build/
44+
45+
deploy:
46+
runs-on: ubuntu-latest
47+
if: github.ref_name == 'main' || (github.event_name == 'workflow_dispatch')
48+
needs:
49+
- build
50+
steps:
51+
- uses: actions/checkout@v4
52+
- uses: actions/download-artifact@v4
53+
with:
54+
name: documentation
55+
path: tech-docs-build
56+
- name: debug
57+
run: |
58+
ls -la
59+
ls -laR tech-docs-build
60+
61+
- name: Deploy
62+
uses: JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c # v4.6.4
63+
with:
64+
folder: tech-docs-build

tech-docs/config/tech-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ show_contribution_banner: true
3737
github_repo: ministryofjustice/hmpps-integration-api-docs
3838
github_branch: main
3939

40-
api_path: https://ministryofjustice.github.io/hmpps-integration-api/openapi/api-docs.json
40+
# api_path: https://ministryofjustice.github.io/hmpps-integration-api/openapi/api-docs.json

tech-docs/source/documentation/api/index.html.md.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ last_reviewed_on: 2024-09-03
66
review_in: 3 months
77
---
88

9-
api>
9+
# API Docs
1010

1111
## OpenAPI Specification
1212

0 commit comments

Comments
 (0)