diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..00ccca4 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,17 @@ +name: Documentation +on: [push, pull_request] + +jobs: + sphinx-build: + name: Run sphinx-build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 # fetch the entire repo history, required to guarantee versioneer will pick up the tags + - uses: astral-sh/setup-uv@v6 + with: + enable-cache: true + # Build HTML and LaTeX docs + # Treat all warnings as errors and "keep-going" to collect all warnings + - run: uv run sphinx-build --fail-on-warning --keep-going docs/ docs/_build diff --git a/.readthedocs.yml b/.readthedocs.yml index 9082d03..3060350 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,7 +1,7 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: python: "3.12" diff --git a/docs/conf.py b/docs/conf.py index 997732b..451fcf5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -25,7 +25,7 @@ sys.path.insert(0, os.path.abspath('../scheil')) from scheil import __version__ as scheil_version # Remove the local version date from the end if there is one -scheil_version = re.sub('\.d[0-9]{8}', '', scheil_version) +scheil_version = re.sub('\\.d[0-9]{8}', '', scheil_version) # -- General configuration ------------------------------------------------ @@ -48,7 +48,7 @@ # Allows for specifying ":issue:`123`" to link to GitHub. # https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html -extlinks = {'issue': ('https://github.com/pycalphad/scheil/issues/%s', 'issue ')} +extlinks = {'issue': ('https://github.com/pycalphad/scheil/issues/%s', 'issue %s')} # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -81,7 +81,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = "en" # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files.