From 91428831839122c6df0f45b538902c46fe414924 Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Sat, 27 Jul 2024 12:04:35 +0200 Subject: [PATCH 1/2] Trigger global docs after Python docs --- .github/workflows/docs-global.yml | 2 +- .github/workflows/docs-python.yml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs-global.yml b/.github/workflows/docs-global.yml index 6a7e0e329346..9444cfd330c1 100644 --- a/.github/workflows/docs-global.yml +++ b/.github/workflows/docs-global.yml @@ -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: diff --git a/.github/workflows/docs-python.yml b/.github/workflows/docs-python.yml index b68bc9ee254d..d06291a5cb7c 100644 --- a/.github/workflows/docs-python.yml +++ b/.github/workflows/docs-python.yml @@ -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 }}" + } From fe0c6855bec8afe88afe8379bd28139f59675c3b Mon Sep 17 00:00:00 2001 From: Stijn de Gooijer Date: Sat, 27 Jul 2024 12:06:18 +0200 Subject: [PATCH 2/2] Don't build dev docs for on release --- .github/workflows/docs-python.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs-python.yml b/.github/workflows/docs-python.yml index d06291a5cb7c..97152a34e903 100644 --- a/.github/workflows/docs-python.yml +++ b/.github/workflows/docs-python.yml @@ -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