From f70bca48c1783a7b7e7ba56b7615115f33095515 Mon Sep 17 00:00:00 2001 From: michalsn Date: Sun, 13 Oct 2024 09:49:49 +0200 Subject: [PATCH 1/2] dev: pin python version for sphinx --- .github/workflows/deploy-userguide-latest.yml | 17 +++++++++++++---- .github/workflows/test-userguide.yml | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy-userguide-latest.yml b/.github/workflows/deploy-userguide-latest.yml index c131c80cd735..9188672f907a 100644 --- a/.github/workflows/deploy-userguide-latest.yml +++ b/.github/workflows/deploy-userguide-latest.yml @@ -33,11 +33,20 @@ jobs: php-version: '8.1' coverage: none - # Build the latest User Guide - - name: Build with Sphinx - uses: ammaraskar/sphinx-action@0.4 + - name: Setup Python + uses: actions/setup-python@v5 with: - docs-folder: user_guide_src/ + python-version: '3.12' + + - name: Install Sphinx + run: | + python -m pip install --upgrade pip + pip install -r user_guide_src/requirements.txt + + # Build the latest User Guide + - name: Build Docs with Sphinx + run: make html + working-directory: user_guide_src - name: Add "Edit this page" links run: | diff --git a/.github/workflows/test-userguide.yml b/.github/workflows/test-userguide.yml index b127d77dd344..f1e0d0bd60e6 100644 --- a/.github/workflows/test-userguide.yml +++ b/.github/workflows/test-userguide.yml @@ -26,10 +26,19 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Install Sphinx + run: | + python -m pip install --upgrade pip + pip install -r user_guide_src/requirements.txt + - name: Detect usage of tabs in RST files run: php utils/check_tabs_in_rst.php - - uses: ammaraskar/sphinx-action@0.4 - with: - docs-folder: user_guide_src - build-command: 'make html SPHINXOPTS="-W --keep-going -w /tmp/sphinx-log"' + - name: Build Docs with Sphinx + run: make html SPHINXOPTS="-W --keep-going -w /tmp/sphinx-log" + working-directory: user_guide_src From 86f6b0e53f5ba65d85885c501789f42195c23204 Mon Sep 17 00:00:00 2001 From: michalsn Date: Sat, 19 Oct 2024 07:29:52 +0200 Subject: [PATCH 2/2] dev: pin python for deploy workflow --- .github/workflows/deploy-distributables.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-distributables.yml b/.github/workflows/deploy-distributables.yml index f28a62544fa5..7c0b4e4dd1ce 100644 --- a/.github/workflows/deploy-distributables.yml +++ b/.github/workflows/deploy-distributables.yml @@ -159,11 +159,15 @@ jobs: token: ${{ secrets.ACCESS_TOKEN }} path: userguide + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Install Sphinx run: | - sudo apt install python3-sphinx - sudo pip3 install sphinxcontrib-phpdomain - sudo pip3 install sphinx_rtd_theme + python -m pip install --upgrade pip + pip install -r ./source/user_guide_src/requirements.txt - name: Chmod run: chmod +x ./source/.github/scripts/deploy-userguide