From 389e8ede2bc7d26a80e941c4c0bf9d3e67bb6c43 Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Mon, 10 Jun 2024 13:13:02 +0200 Subject: [PATCH 1/3] stricter exclude --- .github/workflows/docs-global.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-global.yml b/.github/workflows/docs-global.yml index f0022a8d2b0c..a20c44ebf5b2 100644 --- a/.github/workflows/docs-global.yml +++ b/.github/workflows/docs-global.yml @@ -107,6 +107,7 @@ jobs: clean-exclude: | api/python/ api/rust/ - docs/ - py-polars/ + docs/python + docs/rust + py-polars/html single-commit: true From 3aacd2d8ce90963f66016050c6baa479510ec6a6 Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Mon, 10 Jun 2024 13:22:46 +0200 Subject: [PATCH 2/3] Do not deploy stable API ref on prerelease --- .github/workflows/docs-python.yml | 4 ++-- .github/workflows/release-python.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs-python.yml b/.github/workflows/docs-python.yml index d3ec6bc71e4d..ce97162aac74 100644 --- a/.github/workflows/docs-python.yml +++ b/.github/workflows/docs-python.yml @@ -64,7 +64,7 @@ jobs: shell: bash run: | tag="${{ github.event.client_payload.tag }}" - regex="py-([0-9]+\.[0-9]+)\.[0-9]+.*" + regex="py-([0-9]+)\.[0-9]+\.[0-9]+.*" [[ $tag =~ $regex ]] version=${BASH_REMATCH[1]} echo "version=$version" >> "$GITHUB_OUTPUT" @@ -78,7 +78,7 @@ jobs: single-commit: true - name: Deploy Python docs for latest release version - stable - if: github.event_name == 'repository_dispatch' + if: github.event_name == 'repository_dispatch' && github.event.client_payload.is_prerelease == 'false' uses: JamesIves/github-pages-deploy-action@v4 with: folder: py-polars/docs/build/html diff --git a/.github/workflows/release-python.yml b/.github/workflows/release-python.yml index 2e2015adf495..e6186206c4d3 100644 --- a/.github/workflows/release-python.yml +++ b/.github/workflows/release-python.yml @@ -277,6 +277,7 @@ jobs: client-payload: > { "version": "${{ steps.version.outputs.version }}", + "is_prerelease": "${{ steps.version.outputs.is_prerelease }}", "tag": "${{ steps.github-release.outputs.tag_name }}", "sha": "${{ inputs.sha || github.sha }}" } From 0cae635122a506e4f2a780e77cadbef85247d196 Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Mon, 10 Jun 2024 13:26:20 +0200 Subject: [PATCH 3/3] Update version for 1.0.0 --- py-polars/docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py-polars/docs/source/conf.py b/py-polars/docs/source/conf.py index 33491e697ec0..3fcaa54a5398 100644 --- a/py-polars/docs/source/conf.py +++ b/py-polars/docs/source/conf.py @@ -116,7 +116,7 @@ # Specify version for version switcher dropdown menu git_ref = os.environ.get("POLARS_VERSION", "main") -version_match = re.fullmatch(r"py-(\d+\.\d+)\.\d+.*", git_ref) +version_match = re.fullmatch(r"py-(\d+)\.\d+\.\d+.*", git_ref) switcher_version = version_match.group(1) if version_match is not None else "dev" html_js_files = [