-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (44 loc) · 1.57 KB
/
doc-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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