Update Documentation Search Index #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Documentation Search Index | |
on: | |
# once a month (14:14 at the 14th of the month) | |
schedule: | |
- cron: "14 14 14 * *" | |
# allow triggering manually | |
workflow_dispatch: {} | |
permissions: | |
contents: write | |
#─────────────────────────────────────────────────────────────────────────────── | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "21.x" | |
- name: Update Documentation Search Index | |
run: | | |
node ./.github/doc-search-cache/re-index-documentation.mjs > ./.github/doc-search-cache/cache.json | |
[[ -z "$(git status)" ]] && exit 0 | |
git add ./.github/doc-search-cache/cache.json | |
git commit -m "chore: Updated documentation index" --author="🤖 Automated GitHub Action<cron@job>" | |
git push |