Skip to content
Merged
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
10 changes: 8 additions & 2 deletions .github/workflows/update-search.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ jobs:
run: ruby scripts/generate_search_db.rb


- name: Commit and push if changed
- name: Commit and push changes directly (bypassing branch protection)
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add assets/js/search_db.json
git diff --quiet && git diff --staged --quiet || (git commit -m "Update search database" && git push)
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Update search database"
# Use PAT to bypass branch protection
git push https://${{ secrets.BYPASS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git HEAD:main
fi
Loading