refactor: use sub-dirs for all files in submission dir #289
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: Documentation | |
env: | |
PYTHON_VERSION: "3.12" | |
POETRY_VERSION: "1.4" | |
on: push | |
jobs: | |
sphinx: | |
# Note that we only do this on one platform and with the earliest reasonable Python | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Init Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Init Poetry ${{ env.POETRY_VERSION }} | |
run: | | |
python -m pip install poetry==${{ env.POETRY_VERSION }} | |
poetry config virtualenvs.in-project true | |
poetry config installer.modern-installation false | |
- name: Cache Virtual Environment | |
uses: actions/cache@v4 | |
with: | |
path: ./.venv | |
key: ${{ runner.os }}-sphinx-${{ env.PYTHON_VERSION }}-venv-${{ hashFiles('**/poetry.lock') }} | |
- name: Install Dependencies | |
run: | | |
poetry install | |
- name: Configure Problem Matcher | |
run: echo "::add-matcher::.github/problem-matchers/sphinx.json" | |
# See: https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md | |
# See: https://github.com/python/cpython/pull/20325 | |
- name: Run Sphinx | |
run: | | |
poetry run make clean html | |
working-directory: docs | |
- name: Upload documentation artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hpcflow-documentation (${{ github.sha }}) | |
path: docs/build/html | |
if-no-files-found: error | |
# TODO: Publish the docs to an internal site |