From 20b615668b6eba06c83985935709740b4fec867b Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 12:50:14 -0400 Subject: [PATCH 01/21] add crawler workflow --- .github/workflows/crawler.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/crawler.yml diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml new file mode 100644 index 00000000000..82cb6b4f43a --- /dev/null +++ b/.github/workflows/crawler.yml @@ -0,0 +1,35 @@ +name: Vercel -> Algolia Crawler +on: + push: + branches: [ current ] + +jobs: + algolia_recrawl: + name: Trigger Algolia Crawl + runs-on: ubuntu-latest + steps: + # Checkout repo + - name: Checkout Repo + uses: actions/checkout@v2 + + # Wait for deploy URL to be available from Vercel + - name: Get deployment URL + id: deployment + uses: dorshinar/get-deployment-url@master + timeout-minutes: 10 + with: + token: ${{ github.token }} + # Check for deploy URL every 30 seconds + retryInterval: '30000' + + # Once deploy URL is found, trigger Algolia crawl + - name: Run Algolia Crawler + uses: algolia/algoliasearch-crawler-github-actions@v1 + id: crawler_push + with: + crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} + crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} + algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} + algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} + site-url: 'https://docs.getdbt.com' + crawler-name: ${{ secrets.CRAWLER_NAME }} From 8c97b64c687bbedeaf2c08de71a4dae943797007 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:00:19 -0400 Subject: [PATCH 02/21] update workflow to run on pr to test before merge --- .github/workflows/crawler.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 82cb6b4f43a..f8f1ab009f9 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -2,6 +2,8 @@ name: Vercel -> Algolia Crawler on: push: branches: [ current ] + pull_request: + types: ['opened', 'edited', 'reopened', 'synchronize'] jobs: algolia_recrawl: From 9fffb10835b7536153f8e5b4fec6e0133a4599db Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:00:55 -0400 Subject: [PATCH 03/21] update workflow name --- .github/workflows/crawler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index f8f1ab009f9..a86585c6c61 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -1,4 +1,4 @@ -name: Vercel -> Algolia Crawler +name: Algolia Crawler on: push: branches: [ current ] From 4e61a4588eb52298bf4392cf6cad59a5b073a3d5 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:14:56 -0400 Subject: [PATCH 04/21] update timeout length and test with label --- .github/workflows/crawler.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index a86585c6c61..7804a49f35e 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -2,11 +2,14 @@ name: Algolia Crawler on: push: branches: [ current ] + + # Only used for testing within PR, delete before merge pull_request: types: ['opened', 'edited', 'reopened', 'synchronize'] jobs: algolia_recrawl: + if: ${{ github.event.label.name == 'trigger-crawl' }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: @@ -18,11 +21,11 @@ jobs: - name: Get deployment URL id: deployment uses: dorshinar/get-deployment-url@master - timeout-minutes: 10 + timeout-minutes: 15 with: token: ${{ github.token }} - # Check for deploy URL every 30 seconds - retryInterval: '30000' + # Check for deploy URL every 20 seconds + retryInterval: '20000' # Once deploy URL is found, trigger Algolia crawl - name: Run Algolia Crawler From 98f46283fce8a15eaf6ef22316970fe7bc38c4e0 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:16:27 -0400 Subject: [PATCH 05/21] run on push to branch --- .github/workflows/crawler.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 7804a49f35e..d49bedfa632 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -1,11 +1,11 @@ name: Algolia Crawler on: push: - branches: [ current ] + branches: [ current, automate-crawler ] # Only used for testing within PR, delete before merge - pull_request: - types: ['opened', 'edited', 'reopened', 'synchronize'] + # pull_request: + # types: ['opened', 'edited', 'reopened', 'synchronize'] jobs: algolia_recrawl: From 9bb9cac9e2cc3fab6f515c74077ddb5bb34d92f6 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:19:03 -0400 Subject: [PATCH 06/21] log github.event --- .github/workflows/crawler.yml | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index d49bedfa632..17730591dff 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -3,13 +3,9 @@ on: push: branches: [ current, automate-crawler ] - # Only used for testing within PR, delete before merge - # pull_request: - # types: ['opened', 'edited', 'reopened', 'synchronize'] - jobs: algolia_recrawl: - if: ${{ github.event.label.name == 'trigger-crawl' }} + # if: ${{ github.event.label.name == 'trigger-crawl' }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: @@ -17,15 +13,21 @@ jobs: - name: Checkout Repo uses: actions/checkout@v2 + - name: Dump GitHub context + env: + EVENT_CONTEXT: ${{ toJson(github.event) }} + run: | + echo "$EVENT_CONTEXT" + # Wait for deploy URL to be available from Vercel - - name: Get deployment URL - id: deployment - uses: dorshinar/get-deployment-url@master - timeout-minutes: 15 - with: - token: ${{ github.token }} - # Check for deploy URL every 20 seconds - retryInterval: '20000' + # - name: Get deployment URL + # id: deployment + # uses: dorshinar/get-deployment-url@master + # timeout-minutes: 15 + # with: + # token: ${{ github.token }} + # # Check for deploy URL every 20 seconds + # retryInterval: '20000' # Once deploy URL is found, trigger Algolia crawl - name: Run Algolia Crawler From 5dc87901c1f6ca0b187d0d526b524327ab053359 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:28:45 -0400 Subject: [PATCH 07/21] log labels --- .github/workflows/crawler.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 17730591dff..d201d61689f 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -1,11 +1,14 @@ name: Algolia Crawler on: - push: - branches: [ current, automate-crawler ] + #push: + #branches: [ current, automate-crawler ] + pull_request: + types: ['opened', 'edited', 'reopened', 'synchronize'] jobs: algolia_recrawl: # if: ${{ github.event.label.name == 'trigger-crawl' }} + # if: github.event.pull_request.merged == true name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: @@ -15,7 +18,7 @@ jobs: - name: Dump GitHub context env: - EVENT_CONTEXT: ${{ toJson(github.event) }} + EVENT_CONTEXT: ${{ toJson(github.event.label) }} run: | echo "$EVENT_CONTEXT" @@ -30,13 +33,13 @@ jobs: # retryInterval: '20000' # Once deploy URL is found, trigger Algolia crawl - - name: Run Algolia Crawler - uses: algolia/algoliasearch-crawler-github-actions@v1 - id: crawler_push - with: - crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} - crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} - algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} - algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} - site-url: 'https://docs.getdbt.com' - crawler-name: ${{ secrets.CRAWLER_NAME }} + #- name: Run Algolia Crawler + # uses: algolia/algoliasearch-crawler-github-actions@v1 + # id: crawler_push + # with: + # crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} + # crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} + # algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} + # algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} + # site-url: 'https://docs.getdbt.com' + # crawler-name: ${{ secrets.CRAWLER_NAME }} From 6eb3cf0cc36e6f5ed70a51e1201a26a90d939603 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:30:34 -0400 Subject: [PATCH 08/21] update label context --- .github/workflows/crawler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index d201d61689f..5a8459eddc9 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -18,7 +18,7 @@ jobs: - name: Dump GitHub context env: - EVENT_CONTEXT: ${{ toJson(github.event.label) }} + EVENT_CONTEXT: ${{ toJson(github.event.pull_request.labels) }} run: | echo "$EVENT_CONTEXT" From 503d61dfee0e14764e275f508f2bd4056611ad8d Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:31:57 -0400 Subject: [PATCH 09/21] check additional context --- .github/workflows/crawler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 5a8459eddc9..231f6e32fed 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -18,7 +18,7 @@ jobs: - name: Dump GitHub context env: - EVENT_CONTEXT: ${{ toJson(github.event.pull_request.labels) }} + EVENT_CONTEXT: ${{ toJson(github.event.pull_request) }} run: | echo "$EVENT_CONTEXT" From 4058ea00e28bef0e682c60fcc26c7a720073c45e Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:35:02 -0400 Subject: [PATCH 10/21] run when merged === false to test --- .github/workflows/crawler.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 231f6e32fed..44be5eb0759 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -1,14 +1,14 @@ name: Algolia Crawler on: - #push: - #branches: [ current, automate-crawler ] pull_request: types: ['opened', 'edited', 'reopened', 'synchronize'] jobs: algolia_recrawl: - # if: ${{ github.event.label.name == 'trigger-crawl' }} - # if: github.event.pull_request.merged == true + if: ${{ + contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && + github.event.pull_request.merged == false + }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: From 494d0dddd3c583babc9ffd6f27ba25f9568df59b Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:35:29 -0400 Subject: [PATCH 11/21] fix formatting --- .github/workflows/crawler.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 44be5eb0759..35717db3f9d 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -5,10 +5,7 @@ on: jobs: algolia_recrawl: - if: ${{ - contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && - github.event.pull_request.merged == false - }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == false }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: From f8d54cb26fa7d4c95710e3feebf9bbd34f93f391 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:37:50 -0400 Subject: [PATCH 12/21] this should be skipped --- .github/workflows/crawler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 35717db3f9d..6c658adc057 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -5,7 +5,7 @@ on: jobs: algolia_recrawl: - if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == false }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == true }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: From 6dc6bd1f83c6e9b99ed96e381b70cd3d9e950ae4 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:43:59 -0400 Subject: [PATCH 13/21] add comments and adjust to only run on closed pr --- .github/workflows/crawler.yml | 50 +++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 6c658adc057..bdc9273090e 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -1,10 +1,16 @@ name: Algolia Crawler on: + # Uncomment push to current branch trigger + # if running on each merge to current + # push: + # branches: [ current ] pull_request: - types: ['opened', 'edited', 'reopened', 'synchronize'] + types: + - closed jobs: algolia_recrawl: + # Comment out this if check if running on every merge to current branch if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == true }} name: Trigger Algolia Crawl runs-on: ubuntu-latest @@ -13,30 +19,24 @@ jobs: - name: Checkout Repo uses: actions/checkout@v2 - - name: Dump GitHub context - env: - EVENT_CONTEXT: ${{ toJson(github.event.pull_request) }} - run: | - echo "$EVENT_CONTEXT" - # Wait for deploy URL to be available from Vercel - # - name: Get deployment URL - # id: deployment - # uses: dorshinar/get-deployment-url@master - # timeout-minutes: 15 - # with: - # token: ${{ github.token }} - # # Check for deploy URL every 20 seconds - # retryInterval: '20000' + - name: Get deployment URL + id: deployment + uses: dorshinar/get-deployment-url@master + timeout-minutes: 15 + with: + token: ${{ github.token }} + # Check for deploy URL every 20 seconds + retryInterval: '20000' # Once deploy URL is found, trigger Algolia crawl - #- name: Run Algolia Crawler - # uses: algolia/algoliasearch-crawler-github-actions@v1 - # id: crawler_push - # with: - # crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} - # crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} - # algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} - # algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} - # site-url: 'https://docs.getdbt.com' - # crawler-name: ${{ secrets.CRAWLER_NAME }} + - name: Run Algolia Crawler + uses: algolia/algoliasearch-crawler-github-actions@v1 + id: crawler_push + with: + crawler-user-id: ${{ secrets.CRAWLER_USER_ID }} + crawler-api-key: ${{ secrets.CRAWLER_API_KEY }} + algolia-app-id: ${{ secrets.ALGOLIA_APP_ID }} + algolia-api-key: ${{ secrets.ALGOLIA_API_KEY }} + site-url: 'https://docs.getdbt.com' + crawler-name: ${{ secrets.CRAWLER_NAME }} From 5172f1bdbf1f25a80891650aed44163b0b27ef6f Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:48:22 -0400 Subject: [PATCH 14/21] test with v3 checkout action --- .github/workflows/crawler.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index bdc9273090e..61a6b1413a8 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -7,17 +7,18 @@ on: pull_request: types: - closed + - edited jobs: algolia_recrawl: # Comment out this if check if running on every merge to current branch - if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == true }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == false }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: # Checkout repo - name: Checkout Repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 # Wait for deploy URL to be available from Vercel - name: Get deployment URL From dab54f657aeee04c3bab4aedc85a54ed2e8eb01a Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:49:21 -0400 Subject: [PATCH 15/21] adjust to trigger in open pr --- .github/workflows/crawler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 61a6b1413a8..94c8ed3d3ea 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -6,7 +6,7 @@ on: # branches: [ current ] pull_request: types: - - closed + # - closed - edited jobs: From e79f516ae3a166cac0613e33160aedaab75c9b20 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:51:43 -0400 Subject: [PATCH 16/21] test with v3 checkout] --- .github/workflows/crawler.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 94c8ed3d3ea..4ccc52e8c75 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -2,17 +2,16 @@ name: Algolia Crawler on: # Uncomment push to current branch trigger # if running on each merge to current - # push: - # branches: [ current ] + push: + branches: [ automate-crawler ] pull_request: types: # - closed - - edited jobs: algolia_recrawl: # Comment out this if check if running on every merge to current branch - if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == false }} + #if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == false }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: From a7d3b2da6d7c4a8f727dfb3d1e9cead682bf39ee Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:57:55 -0400 Subject: [PATCH 17/21] final action configured --- .github/workflows/crawler.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 4ccc52e8c75..1eb040a45bc 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -1,17 +1,13 @@ name: Algolia Crawler on: - # Uncomment push to current branch trigger - # if running on each merge to current - push: - branches: [ automate-crawler ] pull_request: types: - # - closed + - closed jobs: algolia_recrawl: - # Comment out this if check if running on every merge to current branch - #if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == false }} + # Comment out the if check below if running on every merge to current branch + if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == false }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: From 6a5d588ca28d6b8092d466bbae6d4069d6f66efd Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 13:58:16 -0400 Subject: [PATCH 18/21] only run if pr is merged --- .github/workflows/crawler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 1eb040a45bc..7d5a3699492 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -7,7 +7,7 @@ on: jobs: algolia_recrawl: # Comment out the if check below if running on every merge to current branch - if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == false }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == true }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: From 28fefec44e7a66043a7c953bf2468b5615645706 Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 14:14:56 -0400 Subject: [PATCH 19/21] adjust if check --- .github/workflows/crawler.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 7d5a3699492..96a70d9d1d0 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -7,7 +7,7 @@ on: jobs: algolia_recrawl: # Comment out the if check below if running on every merge to current branch - if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') && github.event.pull_request.merged == true }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') }} && ${{ github.event.pull_request.merged == true }} name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: @@ -15,6 +15,12 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 + - name: Dump GitHub context + env: + EVENT_CONTEXT: ${{ toJson(github.event.pull_request) }} + run: | + echo "$EVENT_CONTEXT" + # Wait for deploy URL to be available from Vercel - name: Get deployment URL id: deployment From e74b80a021be99a36e26568c43390a5b63004ede Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 15:46:18 -0400 Subject: [PATCH 20/21] wait 10 minutes rather than watch for deployment --- .github/workflows/crawler.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 96a70d9d1d0..793d93a6db0 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -7,7 +7,9 @@ on: jobs: algolia_recrawl: # Comment out the if check below if running on every merge to current branch - if: ${{ contains(github.event.pull_request.labels.*.name, 'trigger-crawl') }} && ${{ github.event.pull_request.merged == true }} + if: | + contains(github.event.pull_request.labels.*.name, 'trigger-crawl') + && github.event.pull_request.merged == true name: Trigger Algolia Crawl runs-on: ubuntu-latest steps: @@ -15,21 +17,8 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - - name: Dump GitHub context - env: - EVENT_CONTEXT: ${{ toJson(github.event.pull_request) }} - run: | - echo "$EVENT_CONTEXT" - - # Wait for deploy URL to be available from Vercel - - name: Get deployment URL - id: deployment - uses: dorshinar/get-deployment-url@master - timeout-minutes: 15 - with: - token: ${{ github.token }} - # Check for deploy URL every 20 seconds - retryInterval: '20000' + # Wait 10 minutes to allow Vercel build to complete + - run: sleep 600 # Once deploy URL is found, trigger Algolia crawl - name: Run Algolia Crawler From 78d23341626f2b6ccbe22466493d0df4b2d1d27f Mon Sep 17 00:00:00 2001 From: Jason Karlavige Date: Wed, 1 Nov 2023 15:55:23 -0400 Subject: [PATCH 21/21] adjust timer --- .github/workflows/crawler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/crawler.yml b/.github/workflows/crawler.yml index 793d93a6db0..6bfce5321c5 100644 --- a/.github/workflows/crawler.yml +++ b/.github/workflows/crawler.yml @@ -17,8 +17,8 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - # Wait 10 minutes to allow Vercel build to complete - - run: sleep 600 + # Wait 8 minutes to allow Vercel build to complete + - run: sleep 480 # Once deploy URL is found, trigger Algolia crawl - name: Run Algolia Crawler