From 0b259bd31c3569f78de11c6e662371ebbf84d3f1 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sun, 13 Sep 2026 16:22:31 +0300 Subject: [PATCH] Ask docs.projectile.mx to rebuild when the docs change docs.projectile.mx rebuilds itself once a day, which is usually soon enough, but a repository_dispatch right after a doc change lands gets the site updated in minutes. It needs a token with write access to docs.projectile.mx in the DOCS_DISPATCH_TOKEN secret; without one the step is skipped. --- .github/workflows/docs-dispatch.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/docs-dispatch.yml diff --git a/.github/workflows/docs-dispatch.yml b/.github/workflows/docs-dispatch.yml new file mode 100644 index 000000000..a6cef7371 --- /dev/null +++ b/.github/workflows/docs-dispatch.yml @@ -0,0 +1,26 @@ +name: Ask docs.projectile.mx to rebuild + +# The docs site is built from this repo's doc/ directory by the docs.projectile.mx +# repository, which rebuilds daily on its own. This asks for a rebuild right +# away when a doc change lands, provided a token for docs.projectile.mx is configured. + +on: + push: + branches: [master] + paths: ["doc/**"] + +env: + DISPATCH_TOKEN: ${{ secrets.DOCS_DISPATCH_TOKEN }} + +jobs: + dispatch: + runs-on: ubuntu-latest + steps: + - name: Send docs-updated to bbatsov/docs.projectile.mx + # Skipped until the DOCS_DISPATCH_TOKEN secret exists. + if: ${{ env.DISPATCH_TOKEN != '' }} + uses: peter-evans/repository-dispatch@v4 + with: + token: ${{ env.DISPATCH_TOKEN }} + repository: bbatsov/docs.projectile.mx + event-type: docs-updated