From 768c6e14dccbdcb39dc31f540f88d2c811949ae7 Mon Sep 17 00:00:00 2001 From: skjnldsv Date: Mon, 15 Jun 2026 11:13:06 +0200 Subject: [PATCH] ci(workflows): fix cron deploys not running on stable branches GitHub Actions schedule events only fire on the default branch (master), so stable* branches were building on push but never deploying. Extract cron into a dedicated schedule-builds.yml orchestrator that dispatches sphinxbuild.yml on master and every stable* branch via workflow_dispatch. sphinxbuild.yml already deploys on workflow_dispatch, so no deploy-condition changes are needed. Signed-off-by: skjnldsv --- .github/workflows/schedule-builds.yml | 26 ++++++++++++++++++++++++++ .github/workflows/sphinxbuild.yml | 2 -- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/schedule-builds.yml diff --git a/.github/workflows/schedule-builds.yml b/.github/workflows/schedule-builds.yml new file mode 100644 index 00000000000..572a5d305a7 --- /dev/null +++ b/.github/workflows/schedule-builds.yml @@ -0,0 +1,26 @@ +name: "Schedule documentation builds" + +on: + schedule: + - cron: '0 2 * * *' # 02:00 UTC daily — triggers sphinxbuild on master + all stable* branches + workflow_dispatch: + +permissions: + actions: write + +jobs: + dispatch: + name: Dispatch sphinxbuild on all branches + runs-on: ubuntu-latest + + steps: + - name: Dispatch on master and stable branches + env: + GH_TOKEN: ${{ github.token }} + run: | + set -e + for branch in master $(gh api "repos/${{ github.repository }}/branches" --paginate \ + --jq '.[].name | select(startswith("stable"))'); do + echo "Dispatching sphinxbuild.yml on ${branch}" + gh workflow run sphinxbuild.yml --repo "${{ github.repository }}" --ref "${branch}" + done diff --git a/.github/workflows/sphinxbuild.yml b/.github/workflows/sphinxbuild.yml index b94ea676d3c..65059bec02c 100644 --- a/.github/workflows/sphinxbuild.yml +++ b/.github/workflows/sphinxbuild.yml @@ -6,8 +6,6 @@ on: branches: - master - stable* - schedule: - - cron: '0 2 * * *' # 02:00 UTC daily — full build + deploy workflow_dispatch: permissions: