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): On Python release, trigger docs build after API reference build #17904

Merged
merged 2 commits into from
Jul 27, 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
2 changes: 1 addition & 1 deletion .github/workflows/docs-global.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- .github/workflows/docs-global.yml
repository_dispatch:
types:
- python-release
- python-release-docs
# Allow manual trigger until we have properly versioned docs
workflow_dispatch:

Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/docs-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: make html

- name: Deploy Python docs for latest development version
if: ${{ github.ref_name == 'main' }}
if: github.event_name == 'push' && github.ref_name == 'main'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by: we don't need to build the dev docs on Python release, as they are already updated with every push to main.

uses: JamesIves/github-pages-deploy-action@v4
with:
folder: py-polars/docs/build/html
Expand Down Expand Up @@ -84,3 +84,14 @@ jobs:
folder: py-polars/docs/build/html
target-folder: api/python/stable
single-commit: true

# Build global docs _after_ this workflow to avoid contention on the gh-pages branch
- name: Trigger global docs workflow
if: github.event_name == 'repository_dispatch'
uses: peter-evans/repository-dispatch@v3
with:
event-type: python-release-docs
client-payload: >
{
"sha": "${{ github.event.client_payload.sha }}"
}