Skip to content

Commit 2924096

Browse files
authored
Remove redundant readthedocs triggers and check for stable changes (#101)
This change removes the redundant RTD webhook triggering that did not work properly, now that pushes to the repo from the GH actions works without a manual trigger. It also removes a check for changes from the stable branch update, since it checks if there were any changes to main, when really it should be checking for diffs between main and stable. If after the submodules were last automatically updated there have been no additional changes to main or to the submodules, the faulty check will cause the update to stable to skip. Since there will always be a diff between main and stable (slang submodule checked out from different branch) the check, even if done properly, is redundant too.
1 parent a12c7b3 commit 2924096

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

.github/workflows/sync-stable-branch.yml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -47,37 +47,8 @@ jobs:
4747
popd
4848
echo "Checked out tag ${{ steps.slang_latest_tag.outputs.tag }} in docs/external/slang"
4949
50-
- name: Check for changes
51-
id: check_changes
52-
run: |
53-
# Only stage the slang submodule, as the others are already updated
54-
git add docs/external/slang
55-
56-
# Check if the index differs from HEAD
57-
# git diff --cached --quiet exits 0 if no diff, 1 if diff
58-
if ! git diff --cached --quiet; then
59-
echo "Changes detected in submodule references."
60-
echo "changes=true" >> $GITHUB_OUTPUT
61-
else
62-
echo "No changes detected in submodule references."
63-
echo "changes=false" >> $GITHUB_OUTPUT
64-
# If no changes, reset the index in case unrelated changes were staged
65-
git reset HEAD --quiet
66-
fi
67-
6850
- name: Commit and push changes to stable branch
69-
if: steps.check_changes.outputs.changes == 'true'
7051
run: |
7152
git commit -m "Sync stable to release (slang@${{ steps.slang_latest_tag.outputs.tag }})"
7253
git push origin HEAD:stable --force
7354
echo "Committed and force-pushed updates to stable branch."
74-
75-
- name: Trigger Read the Docs Build on stable branch update
76-
if: steps.check_changes.outputs.changes == 'true'
77-
env:
78-
RTD_WEBHOOK_SECRET: ${{ secrets.RTD_WEBHOOK_SECRET }}
79-
run: |
80-
curl -X POST \
81-
-d "branches=stable" -d "token=$RTD_WEBHOOK_SECRET" \
82-
https://readthedocs.org/api/v2/webhook/slang-documentation/296117/
83-
echo "Triggered Read the Docs build for stable branch."

.github/workflows/update-submodules.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,3 @@ jobs:
6161
run: |
6262
git commit -m "Auto-update submodules"
6363
git push origin ${{ steps.default_branch.outputs.name }}
64-
65-
- name: Trigger Read the Docs Build
66-
if: steps.check_changes.outputs.changes == 'true'
67-
env:
68-
RTD_WEBHOOK_SECRET: ${{ secrets.RTD_WEBHOOK_SECRET }}
69-
run: |
70-
curl -X POST \
71-
-d "branches=${{ steps.default_branch.outputs.name }}" -d "token=$RTD_WEBHOOK_SECRET" \
72-
https://readthedocs.org/api/v2/webhook/slang-documentation/296117/
73-
echo "Triggered Read the Docs build for ${{ steps.default_branch.outputs.name }} branch."

0 commit comments

Comments
 (0)