Update Algolia Search Results #242
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Update Algolia Search Results' | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
# The CRON duration for the job: At 2:30 AM UTC MON-FRI | |
- cron: '30 2 * * 1-5' | |
# permission can be added at job level or workflow level | |
permissions: | |
id-token: write | |
contents: read # This is required for actions/checkout | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get the content of algolia.json as config | |
id: algolia_config | |
run: echo "::set-output name=config::$(cat apps/base-docs/algolia.json | jq -r tostring)" | |
- name: Push indices to Algolia | |
uses: signcl/docsearch-scraper-action@master | |
env: | |
APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }} | |
API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
CONFIG: ${{ steps.algolia_config.outputs.config }} |