wip #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Doc testing | ||
on: | ||
workflow_call: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- fix-doc-workflow | ||
jobs: | ||
# Create updated container docs for the latest release | ||
list-containers: | ||
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 | ||
Check failure on line 69 in .github/workflows/delete-me.yaml GitHub Actions / Doc testingInvalid workflow file
|
||
- 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. |