From 2cf250759dbdf4d7252daae052bb1cf3fb9ba1b6 Mon Sep 17 00:00:00 2001 From: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com> Date: Sun, 20 Sep 2026 09:29:11 +0200 Subject: [PATCH] ci: signal unionai-docs to regenerate the v1 API reference after a release The docs' v1 API reference is generated from flytekit's docstrings and today only picks up a release through a daily poll, so it can lag by ~24h. This adds a notify-docs job that sends repository_dispatch(flytekit-release) to unionai/unionai-docs after deploy succeeds, mirroring the signal flyteorg/flyte-sdk already sends for the v2 line. Authenticates as the "Unionai Docsy Bot" GitHub App, which is installed on unionai-docs only; this repo holds its credentials as secrets and mints a token scoped to that one repo. Without the secrets the job warns and exits 0, so it can never fail a publish. Co-Authored-By: docsy Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com> --- .github/workflows/pythonpublish.yml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/pythonpublish.yml b/.github/workflows/pythonpublish.yml index 02b969bc69..f5cd80c6ce 100644 --- a/.github/workflows/pythonpublish.yml +++ b/.github/workflows/pythonpublish.yml @@ -73,6 +73,48 @@ jobs: outputs: version: ${{ steps.bump.outputs.version }} + # Tell unionai/unionai-docs to regenerate the v1 API reference for this release. + # The docs' v1 line is generated from flytekit's docstrings and today only picks a + # release up through a daily poll, so a release can take ~24h to appear. This is the + # same signal flyteorg/flyte-sdk sends for the v2 line. + # + # Auth: the "Unionai Docsy Bot" GitHub App is installed on unionai-docs only. This + # repo just holds its credentials as secrets and requests a token scoped to that one + # repo; nothing here grants access to this repository. Without the secrets the job + # warns and exits 0, and the docs' daily poll still catches the release, so this can + # never fail a publish. + notify-docs: + needs: [deploy] + if: always() && needs.deploy.result == 'success' + runs-on: ubuntu-latest + env: + DOCSY_BOT_APP_ID: ${{ secrets.DOCSY_BOT_APP_ID }} + steps: + - name: Mint docsy-bot App token for unionai-docs + id: app-token + if: ${{ env.DOCSY_BOT_APP_ID != '' }} + continue-on-error: true + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ secrets.DOCSY_BOT_APP_ID }} + private-key: ${{ secrets.DOCSY_BOT_PRIVATE_KEY }} + owner: unionai + repositories: unionai-docs + - name: Send repository_dispatch to unionai/unionai-docs + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + if [ -z "${GH_TOKEN}" ]; then + echo "::warning title=docs regen signal skipped::docsy-bot App not configured (DOCSY_BOT_APP_ID / DOCSY_BOT_PRIVATE_KEY). The unionai-docs daily poll will pick this release up instead." + exit 0 + fi + VERSION="${GITHUB_REF#refs/tags/v}" + echo "Signaling unionai/unionai-docs to regenerate v1 API docs for flytekit ${VERSION}" + gh api repos/unionai/unionai-docs/dispatches \ + -f event_type=flytekit-release \ + -f 'client_payload[version]='"${VERSION}" \ + || echo "::warning title=docs regen signal failed::repository_dispatch to unionai-docs failed. The daily poll will pick this release up instead." + build-and-push-docker-images: runs-on: ubuntu-latest needs: deploy