-
Notifications
You must be signed in to change notification settings - Fork 15
106 lines (98 loc) · 2.95 KB
/
delete-me.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Doc testing
on:
workflow_call:
workflow_dispatch:
push:
branches:
- fix-doc-workflow
jobs:
# Create updated container docs for the latest release
list-containers:
needs: check-commit-message
if: ${{ needs.check-commit-message.outputs.contains_release == 'true' }}
uses: ./.github/workflows/listContainers.yaml
generate-and-update-container-docs:
needs:
- list-containers
permissions:
contents: write
runs-on: ubuntu-latest
services:
test-db:
image: postgres:13-alpine3.16
env:
POSTGRES_PASSWORD: pw
POSTGRES_DB: testdb
POSTGRES_USER: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--name testdb
ports:
- 5432:5432
strategy:
matrix:
container: ${{fromJson(needs.list-containers.outputs.containers)}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
ref: 10.0.0
- name: Update Container Documenation
env:
MPI_DBNAME: testdb
MPI_PASSWORD: pw
MPI_DB_TYPE: postgres
MPI_HOST: localhost
MPI_USER: postgres
MPI_PORT: 5432
MPI_PATIENT_TABLE: patient
MPI_PERSON_TABLE: person
run: |
CONTAINER=${{ matrix.container }}
cd $GITHUB_WORKSPACE/containers/$CONTAINER
cp $GITHUB_WORKSPACE/utils/make_openapi_json.py .
pip install -r requirements.txt
python make_openapi_json.py
npx @redocly/cli build-docs $GITHUB_WORKSPACE/docs/10.0.0/containers/$CONTAINER.html openapi.json
- uses: actions/upload-artifact@v3
with:
name: container-docs
path: ./docs/10.0.0/containers
commit-docs:
needs:
- tag-release
- generate-and-update-phdi-docs
- generate-and-update-container-docs
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: docs
- name: Download phdi docs from artifacts
uses: actions/download-artifact@v2
with:
name: phdi-docs
path: ./docs/10.0.0/sdk
- name: Download container docs from artifacts
uses: actions/download-artifact@v2
with:
name: container-docs
path: ./docs/10.0.0/containers
- name: Copy to latest folder
run: |
rm -rf ./docs/latest
mkdir -p ./docs/latest/sdk
mkdir -p ./docs/latest/containers
cp -r ./docs/10.0.0/sdk/* ./docs/latest/sdk
cp -r ./docs/10.0.0/containers/* ./docs/latest/containers
- name: Commit New Documentation
uses: EndBug/add-and-commit@v9
with:
add: docs
message: Automated update of docs for 10.0.0 release.