Merge pull request #228 from wtsi-npg/devel #20
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: Deploy OpenAPI docs | |
on: | |
push: | |
branches: [master] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
DB_URL: "mysql+pymysql://q:q@q/q" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
run: | | |
pipx install poetry | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
architecture: 'x64' | |
# cache: 'poetry' | |
- name: Run poetry install | |
run: | | |
poetry env use '3.10' | |
poetry install | |
- name: Build openapi.json | |
run: | | |
mkdir gh_pages | |
poetry run python -c "from lang_qc.main import app; import json; output = open('gh-pages/openapi.json', 'w'); json.dump(app.openapi(), output); output.close()" | |
- name: Deploy github pages | |
uses: JamesIves/[email protected] | |
with: | |
folder: gh-pages |