From e7ca437a836687937523a70ef513c9330f80cd91 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 1 Feb 2023 13:56:15 +0000 Subject: [PATCH 1/8] =?UTF-8?q?chore:=20=F0=9F=A4=96=20TIAS=20scraper=20vi?= =?UTF-8?q?a=20container?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-gh-pages.yml | 62 +++++++++++++++------------ 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 480e42ee5..872476e8e 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -8,38 +8,44 @@ on: workflow_dispatch: jobs: - deploy: - name: Deploy + # deploy: + # name: Deploy + # runs-on: ubuntu-latest + # env: + # PAT: ${{ secrets.PAT }} + + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-node@v3 + # with: + # node-version: 18 + # cache: yarn + + # - name: Install dependencies + # run: yarn install --frozen-lockfile + # - name: Build website + # run: yarn build + + # - name: Deploy to GitHub Pages + # uses: peaceiris/actions-gh-pages@v3 + # with: + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./build + # # https://github.com/actions/checkout/issues/13#issuecomment-724415212 + # user_name: github-actions[bot] + # user_email: 41898282+github-actions[bot]@users.noreply.github.com + + docsearch-scraper: runs-on: ubuntu-latest + container: + image: algolia/docsearch-scraper env: PAT: ${{ secrets.PAT }} ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} - steps: + setps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: yarn - - - name: Install dependencies - run: yarn install --frozen-lockfile - - name: Build website - run: yarn build - - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build - # https://github.com/actions/checkout/issues/13#issuecomment-724415212 - user_name: github-actions[bot] - user_email: 41898282+github-actions[bot]@users.noreply.github.com - - - name: Algolia docsearch indexer - uses: darrenjennings/algolia-docsearch-action@master - with: - algolia_application_id: ${{env.ALGOLIA_APP_ID}} - algolia_api_key: ${{env.ALGOLIA_API_KEY}} - file: config.docsearch.json + - name: run scraper + run: | + CONFIG=$(cat config.docsearch.json | jq -r tostring) \ No newline at end of file From 9e61cfebcd9e67a033a441c945e253bd4ecfd90d Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 1 Feb 2023 13:57:45 +0000 Subject: [PATCH 2/8] =?UTF-8?q?fix:=20=F0=9F=90=9B=20typo=20amend=20should?= =?UTF-8?q?=20be=20steps?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-gh-pages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 872476e8e..ae253c4d0 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -44,7 +44,7 @@ jobs: ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} - setps: + steps: - uses: actions/checkout@v3 - name: run scraper run: | From d33dfcf64456e3c833459fee9acf8f800ad1debd Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 1 Feb 2023 13:59:35 +0000 Subject: [PATCH 3/8] =?UTF-8?q?chore:=20=F0=9F=A4=96=20declare=20branch=20?= =?UTF-8?q?for=20workflow=20dispatch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-gh-pages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index ae253c4d0..40946d02f 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - chore/scraper-in-docker-version workflow_dispatch: From c31c57b3bc789f4819d853e8ac441d8225fab96d Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 1 Feb 2023 14:03:52 +0000 Subject: [PATCH 4/8] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20install=20jq?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-gh-pages.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 40946d02f..98ce9c084 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -47,6 +47,10 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Install jq + uses: dcarbone/install-jq-action@v1.0.1 + with: + version: 1.6 - name: run scraper run: | CONFIG=$(cat config.docsearch.json | jq -r tostring) \ No newline at end of file From e616f6cb86c9f1df7cd4ea3ae8a82b2081d0b961 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 1 Feb 2023 14:16:02 +0000 Subject: [PATCH 5/8] =?UTF-8?q?chore:=20=F0=9F=A4=96=20tias=20container=20?= =?UTF-8?q?ls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-gh-pages.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 98ce9c084..82aa2240b 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -53,4 +53,5 @@ jobs: version: 1.6 - name: run scraper run: | - CONFIG=$(cat config.docsearch.json | jq -r tostring) \ No newline at end of file + ls -la + ./docsearch docker:run config.docsearch.json \ No newline at end of file From fb6ed6be73dec2098d9eabba7c471d41ac3a13cb Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 1 Feb 2023 14:18:10 +0000 Subject: [PATCH 6/8] =?UTF-8?q?chore:=20=F0=9F=A4=96=20tias=20container=20?= =?UTF-8?q?ls,=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-gh-pages.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 82aa2240b..ab5afab82 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -53,5 +53,8 @@ jobs: version: 1.6 - name: run scraper run: | + ls -la + pwd + cd / ls -la ./docsearch docker:run config.docsearch.json \ No newline at end of file From cf309a8ca2ee4aab7dbc7922549f6d798bb1006a Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 1 Feb 2023 14:20:43 +0000 Subject: [PATCH 7/8] =?UTF-8?q?chore:=20=F0=9F=A4=96=20tias=20signcl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-gh-pages.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index ab5afab82..b1f553ac1 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -51,10 +51,13 @@ jobs: uses: dcarbone/install-jq-action@v1.0.1 with: version: 1.6 - - name: run scraper - run: | - ls -la - pwd - cd / - ls -la - ./docsearch docker:run config.docsearch.json \ No newline at end of file + - name: algolia.json as config + id: algolia_config + run: echo "::set-output name=config::$(cat algolia.json | jq -r tostring)" + + - name: Push indices + uses: signcl/docsearch-scraper-action@master + env: + APPLICATION_ID: ${{ secrets.ALGOLIA_APP_ID }} + API_KEY: ${{ secrets.ALGOLIA_API_KEY }} + CONFIG: ${{ steps.algolia_config.outputs.config }} \ No newline at end of file From 5c10b0a227ff0a995b9bcce95e90d6bdbd52aff6 Mon Sep 17 00:00:00 2001 From: Helder Oliveira Date: Wed, 1 Feb 2023 14:26:39 +0000 Subject: [PATCH 8/8] =?UTF-8?q?chore:=20=F0=9F=A4=96=20tias=20renamed=20co?= =?UTF-8?q?nfig=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-gh-pages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index b1f553ac1..3fb332df2 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -51,9 +51,9 @@ jobs: uses: dcarbone/install-jq-action@v1.0.1 with: version: 1.6 - - name: algolia.json as config + - name: config.docsearch.json as config id: algolia_config - run: echo "::set-output name=config::$(cat algolia.json | jq -r tostring)" + run: echo "::set-output name=config::$(cat config.docsearch.json | jq -r tostring)" - name: Push indices uses: signcl/docsearch-scraper-action@master