diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 0594b5a574a..193b75fd92c 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -323,7 +323,7 @@ jobs:
         run: python3 -m pip install -U pip setuptools wheel
       - name: Install Python dependencies
         run: |
-          python3 -m pip install ruamel.yaml scons numpy cython 'sphinx>=5.3.0' \
+          python3 -m pip install ruamel.yaml scons numpy cython 'sphinx>=7.3,<8' \
             sphinxcontrib-matlabdomain sphinxcontrib-doxylink sphinxcontrib-bibtex \
             pydata-sphinx-theme==0.14.1 sphinx-argparse sphinx_design myst-nb \
             sphinx-copybutton matplotlib pandas scipy pint