From 15d5dc0eecb066fcc159e8d00222c027bb237ab3 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Sun, 1 Mar 2026 00:21:43 +0100 Subject: [PATCH 01/10] Use fork CPython repo --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3551385..2918702 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -17,7 +17,7 @@ jobs: python-version: 3 - uses: actions/checkout@master with: - repository: python/cpython + repository: m-aciek/cpython ref: ${{ github.event.inputs.reference }} - run: make venv working-directory: ./Doc From 3beb01b684ded165e0fa959adea24572e2ff282f Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Sun, 1 Mar 2026 00:41:03 +0100 Subject: [PATCH 02/10] Add librsvg2 OS dependency --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2918702..7860102 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -22,7 +22,7 @@ jobs: - run: make venv working-directory: ./Doc - run: sudo apt-get update - - run: sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy texinfo + - run: sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy texinfo librsvg2-bin - run: make dist-html id: build-html working-directory: ./Doc From fa1516ba0baad1dbc7c8d1e1a9188f611e655d44 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Sun, 1 Mar 2026 02:36:01 +0100 Subject: [PATCH 03/10] Expose logs --- .github/workflows/build.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 7860102..018cac9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -43,6 +43,10 @@ jobs: id: build-pdf working-directory: ./Doc continue-on-error: true + - uses: actions/upload-artifact@master + with: + name: ${{ github.event.inputs.reference }}-pdf-logs.zip + path: ./Doc/build/latex/*.log - uses: actions/upload-artifact@master with: name: ${{ github.event.inputs.reference }}-docs-pdf-a4.zip From 87f1debd3081a53086f4fceb60f354b833a32815 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Mon, 2 Mar 2026 21:20:43 +0100 Subject: [PATCH 04/10] Simplify artifact names in build.yaml by removing reference prefix --- .github/workflows/build.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 018cac9..018539e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,51 +45,51 @@ jobs: continue-on-error: true - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-pdf-logs.zip + name: pdf-logs.zip path: ./Doc/build/latex/*.log - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-docs-pdf-a4.zip + name: docs-pdf-a4.zip path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-pdf-a4.zip if-no-files-found: ignore - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-docs-pdf-a4.tar.bz2 + name: docs-pdf-a4.tar.bz2 path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-pdf-a4.tar.bz2 if-no-files-found: ignore - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-docs-html.zip + name: docs-html.zip path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-html.zip if-no-files-found: ignore - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-docs-html.tar.bz2 + name: docs-html.tar.bz2 path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-html.tar.bz2 if-no-files-found: ignore - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-docs-text.zip + name: docs-text.zip path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-text.zip if-no-files-found: ignore - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-docs-text.tar.bz2 + name: docs-text.tar.bz2 path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-text.tar.bz2 if-no-files-found: ignore - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-docs-texinfo.zip + name: docs-texinfo.zip path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-texinfo.zip if-no-files-found: ignore - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-docs-texinfo.tar.bz2 + name: docs-texinfo.tar.bz2 path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-texinfo.tar.bz2 if-no-files-found: ignore - uses: actions/upload-artifact@master with: - name: ${{ github.event.inputs.reference }}-docs.epub + name: docs.epub path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs.epub if-no-files-found: ignore - name: Checkout gh-pages branch From e7d9e081c95a46fd01078be924aa268b495c9bef Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Tue, 3 Mar 2026 10:45:40 +0100 Subject: [PATCH 05/10] Update artifact upload paths in build.yaml to include .tex files --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 018539e..f5b10d6 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -46,7 +46,9 @@ jobs: - uses: actions/upload-artifact@master with: name: pdf-logs.zip - path: ./Doc/build/latex/*.log + path: | + ./Doc/build/latex/*.log + ./Doc/build/latex/*.tex - uses: actions/upload-artifact@master with: name: docs-pdf-a4.zip From 038386f5708539fddda9cd49776be76955b643ff Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Tue, 3 Mar 2026 11:36:48 +0100 Subject: [PATCH 06/10] Add dist_version parameter This way we can support branches while uploading/publishing artifacts --- .github/workflows/build.yaml | 44 ++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f5b10d6..ae5a2dc 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,6 +6,10 @@ on: description: 'Commit reference from CPython repository' required: true default: '3.14' + dist_version: + description: 'Dist version (compatible with patchlevel.py output)' + required: true + default: '3.14' permissions: contents: write jobs: @@ -52,47 +56,47 @@ jobs: - uses: actions/upload-artifact@master with: name: docs-pdf-a4.zip - path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-pdf-a4.zip + path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-pdf-a4.zip if-no-files-found: ignore - uses: actions/upload-artifact@master with: name: docs-pdf-a4.tar.bz2 - path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-pdf-a4.tar.bz2 + path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-pdf-a4.tar.bz2 if-no-files-found: ignore - uses: actions/upload-artifact@master with: name: docs-html.zip - path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-html.zip + path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-html.zip if-no-files-found: ignore - uses: actions/upload-artifact@master with: name: docs-html.tar.bz2 - path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-html.tar.bz2 + path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-html.tar.bz2 if-no-files-found: ignore - uses: actions/upload-artifact@master with: name: docs-text.zip - path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-text.zip + path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-text.zip if-no-files-found: ignore - uses: actions/upload-artifact@master with: name: docs-text.tar.bz2 - path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-text.tar.bz2 + path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-text.tar.bz2 if-no-files-found: ignore - uses: actions/upload-artifact@master with: name: docs-texinfo.zip - path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-texinfo.zip + path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-texinfo.zip if-no-files-found: ignore - uses: actions/upload-artifact@master with: name: docs-texinfo.tar.bz2 - path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-texinfo.tar.bz2 + path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-texinfo.tar.bz2 if-no-files-found: ignore - uses: actions/upload-artifact@master with: name: docs.epub - path: ./Doc/dist/python-${{ github.event.inputs.reference }}-docs.epub + path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs.epub if-no-files-found: ignore - name: Checkout gh-pages branch uses: actions/checkout@v4 @@ -103,31 +107,31 @@ jobs: run: | mkdir -p gh-pages/3 # PDF - cp ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-pdf-a4.zip gh-pages/3/python-${{ github.event.inputs.reference }}-docs-pdf-a4.zip 2>/dev/null || true - cp ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-pdf-a4.tar.bz2 gh-pages/3/python-${{ github.event.inputs.reference }}-docs-pdf-a4.tar.bz2 2>/dev/null || true + cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-pdf-a4.zip gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs-pdf-a4.zip 2>/dev/null || true + cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-pdf-a4.tar.bz2 gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs-pdf-a4.tar.bz2 2>/dev/null || true # HTML - cp ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-html.zip gh-pages/3/python-${{ github.event.inputs.reference }}-docs-html.zip 2>/dev/null || true - cp ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-html.tar.bz2 gh-pages/3/python-${{ github.event.inputs.reference }}-docs-html.tar.bz2 2>/dev/null || true + cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-html.zip gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs-html.zip 2>/dev/null || true + cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-html.tar.bz2 gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs-html.tar.bz2 2>/dev/null || true # Text - cp ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-text.zip gh-pages/3/python-${{ github.event.inputs.reference }}-docs-text.zip 2>/dev/null || true - cp ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-text.tar.bz2 gh-pages/3/python-${{ github.event.inputs.reference }}-docs-text.tar.bz2 2>/dev/null || true + cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-text.zip gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs-text.zip 2>/dev/null || true + cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-text.tar.bz2 gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs-text.tar.bz2 2>/dev/null || true # Texinfo - cp ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-texinfo.zip gh-pages/3/python-${{ github.event.inputs.reference }}-docs-texinfo.zip 2>/dev/null || true - cp ./Doc/dist/python-${{ github.event.inputs.reference }}-docs-texinfo.tar.bz2 gh-pages/3/python-${{ github.event.inputs.reference }}-docs-texinfo.tar.bz2 2>/dev/null || true + cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-texinfo.zip gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs-texinfo.zip 2>/dev/null || true + cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs-texinfo.tar.bz2 gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs-texinfo.tar.bz2 2>/dev/null || true # EPUB - cp ./Doc/dist/python-${{ github.event.inputs.reference }}-docs.epub gh-pages/3/python-${{ github.event.inputs.reference }}-docs.epub 2>/dev/null || true + cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs.epub gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs.epub 2>/dev/null || true - name: Commit generated archives id: commit run: | cd gh-pages git config user.name github-actions git config user.email github-actions@github.com - git add 3/python-${{ github.event.inputs.reference }}-docs-* || true + git add 3/python-${{ github.event.inputs.dist_version }}-docs-* || true if git diff --cached --quiet; then echo "No documentation archives to commit" echo "has_changes=false" >> $GITHUB_OUTPUT else - git commit -m "Update documentation archives for ${{ github.event.inputs.reference }}" + git commit -m "Update documentation archives for ${{ github.event.inputs.dist_version }}" echo "has_changes=true" >> $GITHUB_OUTPUT fi - name: Push commit From d9bb727545d588d5b3fb7cba3cce25151842ddfb Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Wed, 4 Mar 2026 18:57:18 +0100 Subject: [PATCH 07/10] Add repository parameter --- .github/workflows/build.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index ae5a2dc..6130175 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -run-name: build ${{ github.event.inputs.reference }} +run-name: build ${{ github.event.inputs.reference }}:${{ github.event.inputs.reference }} on: workflow_dispatch: inputs: @@ -10,6 +10,10 @@ on: description: 'Dist version (compatible with patchlevel.py output)' required: true default: '3.14' + repository: + description: 'Repository to checkout' + required: true + default: 'python/cpython' permissions: contents: write jobs: @@ -21,7 +25,7 @@ jobs: python-version: 3 - uses: actions/checkout@master with: - repository: m-aciek/cpython + repository: ${{ github.event.inputs.repository }} ref: ${{ github.event.inputs.reference }} - run: make venv working-directory: ./Doc From 8c9d59842e6df4889cf5501173580eb2bd047485 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Wed, 4 Mar 2026 19:01:44 +0100 Subject: [PATCH 08/10] Add publish parameter --- .github/workflows/build.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6130175..791d300 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,6 +14,10 @@ on: description: 'Repository to checkout' required: true default: 'python/cpython' + publish: + description: 'Publish to GitHub Pages' + required: true + default: false permissions: contents: write jobs: @@ -103,11 +107,13 @@ jobs: path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs.epub if-no-files-found: ignore - name: Checkout gh-pages branch + if: ${{ github.event.inputs.publish }} uses: actions/checkout@v4 with: ref: gh-pages path: gh-pages - name: Copy generated archives to gh-pages + if: ${{ github.event.inputs.publish }} run: | mkdir -p gh-pages/3 # PDF @@ -125,6 +131,7 @@ jobs: # EPUB cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs.epub gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs.epub 2>/dev/null || true - name: Commit generated archives + if: ${{ github.event.inputs.publish }} id: commit run: | cd gh-pages @@ -139,7 +146,7 @@ jobs: echo "has_changes=true" >> $GITHUB_OUTPUT fi - name: Push commit - if: steps.commit.outputs.has_changes == 'true' + if: ${{ github.event.inputs.publish && steps.commit.outputs.has_changes == 'true' }} uses: ad-m/github-push-action@master with: branch: gh-pages From 8da5f058aed32eb433d38a403f1f90effe144bc3 Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Wed, 4 Mar 2026 19:03:58 +0100 Subject: [PATCH 09/10] Fix run name --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 791d300..5241335 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -run-name: build ${{ github.event.inputs.reference }}:${{ github.event.inputs.reference }} +run-name: build ${{ github.event.inputs.repository }}:${{ github.event.inputs.reference }} on: workflow_dispatch: inputs: From b9b1647104311650c871166e0d8d3501d057f7dd Mon Sep 17 00:00:00 2001 From: Maciej Olko Date: Wed, 4 Mar 2026 20:43:11 +0100 Subject: [PATCH 10/10] Make repository and publish parameters optional in build.yaml --- .github/workflows/build.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5241335..d24bd5e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,11 +12,11 @@ on: default: '3.14' repository: description: 'Repository to checkout' - required: true + required: false default: 'python/cpython' publish: description: 'Publish to GitHub Pages' - required: true + required: false default: false permissions: contents: write @@ -107,13 +107,13 @@ jobs: path: ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs.epub if-no-files-found: ignore - name: Checkout gh-pages branch - if: ${{ github.event.inputs.publish }} + if: ${{ github.event.inputs.publish == 'true' }} uses: actions/checkout@v4 with: ref: gh-pages path: gh-pages - name: Copy generated archives to gh-pages - if: ${{ github.event.inputs.publish }} + if: ${{ github.event.inputs.publish == 'true' }} run: | mkdir -p gh-pages/3 # PDF @@ -131,7 +131,7 @@ jobs: # EPUB cp ./Doc/dist/python-${{ github.event.inputs.dist_version }}-docs.epub gh-pages/3/python-${{ github.event.inputs.dist_version }}-docs.epub 2>/dev/null || true - name: Commit generated archives - if: ${{ github.event.inputs.publish }} + if: ${{ github.event.inputs.publish == 'true' }} id: commit run: | cd gh-pages @@ -146,7 +146,7 @@ jobs: echo "has_changes=true" >> $GITHUB_OUTPUT fi - name: Push commit - if: ${{ github.event.inputs.publish && steps.commit.outputs.has_changes == 'true' }} + if: ${{ github.event.inputs.publish == 'true' && steps.commit.outputs.has_changes == 'true' }} uses: ad-m/github-push-action@master with: branch: gh-pages