From 2f3d91637b8c31dc637f416cb006454f1d78fe91 Mon Sep 17 00:00:00 2001 From: Bruno Amui Date: Tue, 3 Dec 2024 15:38:05 -0300 Subject: [PATCH] Create algolia_scraper.yml --- .github/workflows/algolia_scraper.yml | 46 +++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/algolia_scraper.yml diff --git a/.github/workflows/algolia_scraper.yml b/.github/workflows/algolia_scraper.yml new file mode 100644 index 000000000..674797cc1 --- /dev/null +++ b/.github/workflows/algolia_scraper.yml @@ -0,0 +1,46 @@ +name: Help Center Scraper + +on: + pull_request: + branches: + - main + types: [closed] + + workflow_dispatch: + +jobs: + scrape-files: + runs-on: ubuntu-latest + name: Scraper running + steps: + - uses: actions/checkout@v2.1.0 + - name: 'get changed files' + uses: jitterbit/get-changed-files@v1 + id: generate-changed-files + with: + format: space-delimited + token: ${{ secrets.GITHUB_TOKEN }} + - name: Printing + run: | + echo "All:" + echo "${{ steps.generate-changed-files.outputs.all }}" + echo "Added:" + echo "${{ steps.generate-changed-files.outputs.added }}" + echo "Removed:" + echo "${{ steps.generate-changed-files.outputs.removed }}" + echo "Renamed:" + echo "${{ steps.generate-changed-files.outputs.renamed }}" + echo "Modified:" + echo "${{ steps.generate-changed-files.outputs.modified }}" + echo "Added+Modified:" + echo "${{ steps.generate-changed-files.outputs.added_modified }}" + - uses: actions/checkout@v2 + - name: Helpcenter Scraper + uses: vtexdocs/devportal-docsearch-action@main + with: + algolia_application_id: '${{ secrets.ALGOLIA_APP_ID }}' + algolia_api_key: ${{ secrets.ALGOLIA_WRITE_KEY }} + file: './configs/scraper_helpcenter_files.json' + added: '${{ steps.generate-changed-files.outputs.added }}' + updated: '${{ steps.generate-changed-files.outputs.modified }}' + removed: '${{ steps.generate-changed-files.outputs.removed }}'