From 6ea1119ddded01da94039933979ec8eeb283c8f1 Mon Sep 17 00:00:00 2001 From: Michiel De Backker Date: Sat, 24 Oct 2026 11:08:14 +0000 Subject: [PATCH] Bump CI dependencies and pin Pygments steps to setup-python's interpreter w3c/spec-prod sets up its own Python and leaves it first on the PATH, so the "Generate *_messages.html" steps that run after the first spec-prod step picked up an interpreter without Pygments and failed with "ModuleNotFoundError: No module named 'pygments'". Call the interpreter installed by actions/setup-python through its python-path output instead of a bare `python`. Also bump actions/checkout and actions/setup-python to v7 and the in-repo Python to 3.15. w3c/spec-prod@v2 already resolves to the latest release (v2.14.1). --- .github/workflows/auto-publish.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/auto-publish.yml b/.github/workflows/auto-publish.yml index c2efbc5..6380e98 100644 --- a/.github/workflows/auto-publish.yml +++ b/.github/workflows/auto-publish.yml @@ -23,24 +23,28 @@ jobs: steps: # See doc at https://github.com/actions/checkout/ - name: Checkout repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 # See doc at https://github.com/actions/setup-python/ + # The w3c/spec-prod action sets up its own Python and puts it first on the + # PATH, so later steps call this interpreter through its python-path + # output rather than relying on a bare `python`. - name: Setup Python - uses: actions/setup-python@v6 + id: setup-python + uses: actions/setup-python@v7 with: - python-version: 3.13 + python-version: '3.15' - name: Install Python dependencies run: | - python -m pip install --upgrade pip - pip install Pygments + ${{ steps.setup-python.outputs.python-path }} -m pip install --upgrade pip + ${{ steps.setup-python.outputs.python-path }} -m pip install Pygments # Note: the step actually generates all CDDL message pages, but the # w3c/spec-prod action cleans these files after each build, so we'll # have to generate them again each time. - name: Generate messages_appendix.html - run: python scripts/pygmentize_dir.py + run: ${{ steps.setup-python.outputs.python-path }} scripts/pygmentize_dir.py # See doc at https://github.com/w3c/spec-prod/#spec-prod # The action only deploys the generated spec to the gh-pages branch when @@ -51,7 +55,7 @@ jobs: GH_PAGES_BRANCH: gh-pages - name: Generate application_messages.html - run: python scripts/pygmentize_dir.py + run: ${{ steps.setup-python.outputs.python-path }} scripts/pygmentize_dir.py - name: Build and validate application.html, push to gh-pages branch if needed uses: w3c/spec-prod@v2 @@ -65,7 +69,7 @@ jobs: status: WD - name: Generate network_messages.html - run: python scripts/pygmentize_dir.py + run: ${{ steps.setup-python.outputs.python-path }} scripts/pygmentize_dir.py - name: Build and validate network.html, push to gh-pages branch if needed uses: w3c/spec-prod@v2