Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/workflows/sync-stable-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,37 +47,8 @@ jobs:
popd
echo "Checked out tag ${{ steps.slang_latest_tag.outputs.tag }} in docs/external/slang"

- name: Check for changes
id: check_changes
run: |
# Only stage the slang submodule, as the others are already updated
git add docs/external/slang

# Check if the index differs from HEAD
# git diff --cached --quiet exits 0 if no diff, 1 if diff
if ! git diff --cached --quiet; then
echo "Changes detected in submodule references."
echo "changes=true" >> $GITHUB_OUTPUT
else
echo "No changes detected in submodule references."
echo "changes=false" >> $GITHUB_OUTPUT
# If no changes, reset the index in case unrelated changes were staged
git reset HEAD --quiet
fi

- name: Commit and push changes to stable branch
if: steps.check_changes.outputs.changes == 'true'
run: |
git commit -m "Sync stable to release (slang@${{ steps.slang_latest_tag.outputs.tag }})"
git push origin HEAD:stable --force
echo "Committed and force-pushed updates to stable branch."

- name: Trigger Read the Docs Build on stable branch update
if: steps.check_changes.outputs.changes == 'true'
env:
RTD_WEBHOOK_SECRET: ${{ secrets.RTD_WEBHOOK_SECRET }}
run: |
curl -X POST \
-d "branches=stable" -d "token=$RTD_WEBHOOK_SECRET" \
https://readthedocs.org/api/v2/webhook/slang-documentation/296117/
echo "Triggered Read the Docs build for stable branch."
10 changes: 0 additions & 10 deletions .github/workflows/update-submodules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,3 @@ jobs:
run: |
git commit -m "Auto-update submodules"
git push origin ${{ steps.default_branch.outputs.name }}

- name: Trigger Read the Docs Build
if: steps.check_changes.outputs.changes == 'true'
env:
RTD_WEBHOOK_SECRET: ${{ secrets.RTD_WEBHOOK_SECRET }}
run: |
curl -X POST \
-d "branches=${{ steps.default_branch.outputs.name }}" -d "token=$RTD_WEBHOOK_SECRET" \
https://readthedocs.org/api/v2/webhook/slang-documentation/296117/
echo "Triggered Read the Docs build for ${{ steps.default_branch.outputs.name }} branch."