]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
.github: Fix RTD build retrigger 63211/head
authorDavid Galloway <david.galloway@ibm.com>
Tue, 6 May 2025 21:31:03 +0000 (17:31 -0400)
committerDavid Galloway <david.galloway@ibm.com>
Fri, 9 May 2025 14:49:14 +0000 (10:49 -0400)
Fixes: https://tracker.ceph.com/issues/70430
Signed-off-by: David Galloway <david.galloway@ibm.com>
(cherry picked from commit 27521bf5580d4f878fbf7cafbd854bc6ef94aed4)

.github/workflows/retrigger-rtd.yml [new file with mode: 0644]

diff --git a/.github/workflows/retrigger-rtd.yml b/.github/workflows/retrigger-rtd.yml
new file mode 100644 (file)
index 0000000..daa4ae7
--- /dev/null
@@ -0,0 +1,25 @@
+name: Retrigger RTD build on PR comment
+
+on:
+  issue_comment:
+    types: [created]
+
+permissions:
+  contents: read
+  pull-requests: read
+
+jobs:
+  retrigger-rtd:
+    if: github.event.issue.pull_request &&
+        (contains(github.event.comment.body, 'jenkins test docs') || 
+         contains(github.event.comment.body, 'jenkins rebuild docs') || 
+         contains(github.event.comment.body, 'jenkins retrigger docs'))
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Trigger Read the Docs build
+        run: |
+          curl -X POST \
+            "https://readthedocs.org/api/v3/projects/ceph/versions/${{ github.event.issue.number }}/builds/" \
+            -H "Authorization: Token ${{ secrets.READTHEDOCS_API_TOKEN }}" \
+            -H "Content-Type: application/json"