diff --git a/.github/actions-scripts/enterprise-server-issue-templates/release-issue.md b/.github/actions-scripts/enterprise-server-issue-templates/release-issue.md index 8e8616a640..80e58daaf0 100644 --- a/.github/actions-scripts/enterprise-server-issue-templates/release-issue.md +++ b/.github/actions-scripts/enterprise-server-issue-templates/release-issue.md @@ -106,5 +106,8 @@ This file should be automatically updated, but you can also run `script/update-e - [ ] Remove `[DO NOT MERGE]` and other meta information from the PR title 😜. - [ ] The `github/docs-internal` repo is frozen, and the `Repo Freeze Check / Prevent merging during deployment freezes (pull_request_target)` test is expected to fail. Use admin permissions to ship the release branch with this failure. - [ ] Do any required smoke tests. +- [ ] Push the search index LFS objects for the public `github/docs` repo. The LFS objects were already being pushed for the internal repo after the `sync-english-index-for-` was added to the megabranch. To push the LFS objects, run the [search sync workflow](https://github.com/github/docs-internal/actions/workflows/sync-search-indices.yml) with the following inputs: + version: `enterprise-server@` + language: `en` - [ ] Once smoke tests have passed, you can [unfreeze the repos](https://github.com/github/docs-content/blob/main/docs-content-docs/docs-content-workflows/freezing.md) and post an announcement in Slack. - [ ] After the release, in the `docs-content` repo, add the now live version number to the "Specific GHES version(s)" section in the following files: [`.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-1-or-2-tracking.yml) and [`.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml`](https://github.com/github/docs-content/blob/main/.github/ISSUE_TEMPLATE/release-tier-3-or-tier-4.yml). When the PR is approved, merge it in. \ No newline at end of file diff --git a/.github/workflows/sync-search-indices.yml b/.github/workflows/sync-search-indices.yml index 662243aa10..e7f8d09c84 100644 --- a/.github/workflows/sync-search-indices.yml +++ b/.github/workflows/sync-search-indices.yml @@ -21,6 +21,15 @@ name: Sync search indexes 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@`, `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 @@ -58,6 +67,8 @@ jobs: - name: Update search indexes env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ github.event.inputs.version }} + LANGUAGE: ${{ github.event.inputs.language }} run: npm run sync-search - name: Update private docs repository search indexes diff --git a/contributing/search.md b/contributing/search.md index 59e98a0d6e..d2d0c09c2a 100644 --- a/contributing/search.md +++ b/contributing/search.md @@ -43,7 +43,7 @@ The Actions workflow progress can be viewed (by GitHub employees) in the [Action ## Manually triggering the search index update workflow -You can manually run the workflow to generate the indexes after you push your changes to `main` to speed up the indexing when needed. To run it manually, click "Run workflow" button in the [Actions tab](https://github.com/github/docs-internal/actions/workflows/sync-search-indices.yml). +You can manually run the workflow to generate the indexes after you push your changes to `main` to speed up the indexing when needed. It's recommended to do this for only the `free-pro-team@latest` version and the `en` language because running all languages and versions take about 40 minutes. To run it manually, click "Run workflow" button in the [Actions tab](https://github.com/github/docs-internal/actions/workflows/sync-search-indices.yml). Enter the language and version you'd like to generate the indexes for as inputs to the workflow. By default, all language and versions are generated. ## Generating search indexes for your local checkout diff --git a/script/sync-search-indices.js b/script/sync-search-indices.js index a46647a8d6..fa3ec0bd67 100755 --- a/script/sync-search-indices.js +++ b/script/sync-search-indices.js @@ -14,6 +14,18 @@ main() async function main() { const sync = searchSync + // When called by the .github/workflows/sync-search-indices workflow + // the variable can be set to all or an empty string. + // + // The script/search/sync script expects the variables to be unset + // to select all languages or versions. + if (process.env.LANGUAGE === 'all' || process.env.LANGUAGE === '') { + delete process.env.LANGUAGE + } + if (process.env.VERSION === 'all' || process.env.VERSION === '') { + delete process.env.VERSION + } + const opts = { dryRun: 'DRY_RUN' in process.env, language: process.env.LANGUAGE,