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: