From 56a4ebaa94281e0fc9967e0bfbcd621026e64217 Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Mon, 9 Aug 2021 20:39:18 -0400 Subject: [PATCH 1/2] checkout the branch not commit sha (#20748) --- .github/workflows/sync-single-english-index.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/sync-single-english-index.yml b/.github/workflows/sync-single-english-index.yml index 11fc059cd4..785363117e 100644 --- a/.github/workflows/sync-single-english-index.yml +++ b/.github/workflows/sync-single-english-index.yml @@ -46,6 +46,10 @@ jobs: LANGUAGE: 'en' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + echo 'git show-ref' + git show-ref + echo 'git checkout $GITHUB_HEAD_REF' + git checkout $GITHUB_HEAD_REF npm run build npm run sync-search From 66340e6f0ac67224bd0649217408aebfd0ba9e7e Mon Sep 17 00:00:00 2001 From: Rachael Sewell Date: Mon, 9 Aug 2021 21:12:38 -0400 Subject: [PATCH 2/2] Checkout head_ref (#20750) --- .github/workflows/sync-single-english-index.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sync-single-english-index.yml b/.github/workflows/sync-single-english-index.yml index 785363117e..90111975f4 100644 --- a/.github/workflows/sync-single-english-index.yml +++ b/.github/workflows/sync-single-english-index.yml @@ -25,6 +25,8 @@ jobs: steps: - name: checkout uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f + with: + ref: ${{ github.head_ref }} - name: Setup Node uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f @@ -46,10 +48,6 @@ jobs: LANGUAGE: 'en' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - echo 'git show-ref' - git show-ref - echo 'git checkout $GITHUB_HEAD_REF' - git checkout $GITHUB_HEAD_REF npm run build npm run sync-search