Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(python): Do not update stable API reference on prerelease #16846

Merged
merged 3 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/docs-global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ jobs:
clean-exclude: |
api/python/
api/rust/
docs/
py-polars/
docs/python
docs/rust
py-polars/html
single-commit: true
4 changes: 2 additions & 2 deletions .github/workflows/docs-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
}
2 changes: 1 addition & 1 deletion py-polars/docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down