-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploy OpenAPI html2 documentation to GitHub Pages
- Loading branch information
1 parent
3f6858b
commit 9dace03
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,47 @@ jobs: | |
- name: Stop services | ||
run: just down | ||
|
||
build-docs: | ||
name: Generate OpenAPI Documentation | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: openapi | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: openapi_schema | ||
- name: Install the OpenAPI Generator | ||
run: npm install @openapitools/openapi-generator-cli -g | ||
- name: Generate html2 | ||
run: | | ||
openapi-generator-cli generate -i schema_split.yaml -g html2 -o dist \ | ||
-p [email protected],infoUrl=https://chrisproject.org \ | ||
-p licenseInfo=MIT \ | ||
-p licenseUrl=${{ github.server_url }}/${{ github.repository }}/blob/${{ github.sha }}/LICENSE \ | ||
-p pythonPackageName=chris_oag | ||
- name: Upload pages artifact | ||
with: | ||
path: ./dist | ||
|
||
deploy-docs: | ||
name: Update GitHub Pages | ||
needs: build-docs | ||
runs-on: ubuntu-24.04 | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
|
||
draft-release: | ||
name: Draft GitHub Release | ||
runs-on: ubuntu-24.04 | ||
|