Skip to content

Bump liquidjs from 9.22.1 to 10.16.7 #3800

Bump liquidjs from 9.22.1 to 10.16.7

Bump liquidjs from 9.22.1 to 10.16.7 #3800

name: Enterprise Server Release Search Sync
# **What it does**: This workflow is used during the Enterprise Server release
# process. The Enterprise release checklist includes a step to add a label in
# the format `sync-english-index-for-enterprise-server@<RELEASE NUMBER>`. When
# that label is added, this workflow runs anytime new commits are made to the
# Enterprise release megabranch. The Docubot user commits the search indexes in
# the `lib/search/indexes` directory.
#
# **Why we have it**: The Lunr index for the next Enterprise release doesn't yet
# exist, so we need to generate it. Search wouldn't work at all if we shipped
# the new release without shipping the index for that release at the same time.
#
# **Who does it impact**: The DRI for the Enterprise release, the content
# writers that are a part of the release and the docs-engineering DRI.
on:
workflow_dispatch:
pull_request:
types:
- labeled
- unlabeled
- opened
- reopened
- synchronize
- ready_for_review
- unlocked
# This workflow requires a label in the format `sync-english-index-for-<PLAN@RELEASE>`
jobs:
updateIndices:
name: Update English index for new GHES release
# Skip this check if the event originated from Docubot, to prevent
# infinite runs when Docubot checks in the search indexes in this workflow
if: github.repository == 'github/docs-internal' && github.event.sender.login != 'Docubot'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.DOCUBOT_REPO_PAT }}
- name: Setup Node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.8.x
cache: npm
- name: Install dependencies
run: npm ci
- name: Get GHES release number from search label if present; only continue if the label is found.
id: getVersion
run: $GITHUB_WORKSPACE/.github/actions-scripts/enterprise-search-label.js
- name: Generate the search index files
if: ${{ steps.getVersion.outputs.versionToSync }}
env:
VERSION: ${{ steps.getVersion.outputs.versionToSync }}
LANGUAGE: 'en'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run build
npm run sync-search
- name: Commit the index files and push LFS objects
if: ${{ steps.getVersion.outputs.versionToSync }}
run: |
echo 'git config user.name Docubot'
git config user.name Docubot
echo 'git config user.email 67483024+docubot@users.noreply.github.com'
git config user.email 67483024+docubot@users.noreply.github.com
echo 'git add lib/search/indexes'
git add lib/search/indexes/*
echo 'git commit -m "update search indexes"'
git commit -m 'update search indexes'
echo 'git lfs push --all origin'
git lfs push --all origin
echo 'git push origin' $GITHUB_HEAD_REF '--set-upstream'
git push origin $GITHUB_HEAD_REF --set-upstream