You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# **What it does**: This workflow syncs the Lunr search indexes.
# The search indexes are checked into the lib/search/indexes directory.
# Search indexes are checked directly into the `main` branch on both the
# internal and open-source docs repositories. This workflow should be the
# only mechanism that the search indexes are modified. Because of that,
# repo-sync will not sync the search indexes because it should not detect
# a change.
# **Why we have it**: We want our search indexes kept up to date.
# **Who does it impact**: Anyone using search on docs.
# **Testing: To test this workflow, use the workflow_dispatch event and trigger
# the workflow from the action tab. Select the branch with the changes to the
# workflow. Set `fetch-depth: 0` as an input to the checkout action to get all
# branches, including your test branch. Otherwise, you'll only get the main
# branch. For git lfs push and git push commands use the --dry-run switch to
# prevent pushes (e.g., git push --dry-run origin main --no-verify and
# git lfs push --dry-run public-docs-repo).
# The dry-run switch does everything but actually send the updates.
on:
workflow_dispatch:
inputs:
language:
description: 'Language to generate the search index for. Can be one of: `en` English, `cn` Chinese simplified, `ja` Japanese, `es` Spanish, `pt` Portuguese., `all` all languages.'
required: false
default: 'all'
version:
description: 'Version to generate the search index for. Can be one of: `free-pro-team@latest`, `enterprise-server@<RELEASE NUMBER>`, `github-ae@latest`, `all` all versions.'
required: false
default: 'all'
schedule:
- cron: '53 0/8 * * *'# Run every eight hours at 53 minutes past the hour
permissions:
contents: none
env:
FREEZE: ${{ secrets.FREEZE }}
jobs:
updateIndexes:
name: Update indexes
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- if: ${{ env.FREEZE == 'true' }}
run: |
echo 'The repo is currently frozen! Exiting this workflow.'