export and auto-commit docs/docs/api/openapi.json as part of test-api-contract workflow (#719)

- copies that openapi.json file to docs/docs/api/openapi.json as part of start-mock-server.sh.
- adds a step to the end of the test-api-contract workflow that just auto-commits changes to the docs/docs/api/openapi.json file.
- excludes docs/docs/api/openapi.json from pre-commit since its already been formatted by jq.
This commit is contained in:
Andrew Maguire
2023-01-14 22:40:33 +00:00
committed by GitHub
parent 885065adec
commit 0f607c7a28
7 changed files with 1712 additions and 309 deletions
+7
View File
@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- add-api-docs-workflow
paths:
- "oasst-shared/**"
- "backend/**"
@@ -44,3 +45,9 @@ jobs:
run: ./scripts/frontend-development/run-contract-test.sh
- run: ./scripts/backend-development/stop-mock-server.sh
- uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: "docs/docs/api/openapi.json"
commit_message:
update docs/docs/api/openapi.json by run ${{ github.run_id }}