Skip to content

Commit

Permalink
ci(python): On Python release, trigger docs build after API reference…
Browse files Browse the repository at this point in the history
… build (#17904)
  • Loading branch information
stinodego committed Jul 27, 2024
1 parent 5fc791c commit 3a97d9a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
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'
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 }}"
}

0 comments on commit 3a97d9a

Please sign in to comment.