This repository has been archived by the owner on Nov 24, 2023. It is now read-only.
Algolia Index #101
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: Algolia Index | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Runs every day at midnight (UTC time) | |
workflow_dispatch: | |
jobs: | |
cron_job: | |
runs-on: ubuntu-latest | |
env: | |
APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }} | |
API_KEY: ${{ secrets.ALGOLIA_API_KEY }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Create .env file | |
run: | | |
echo "APPLICATION_ID=${{ secrets.ALGOLIA_APPLICATION_ID }}" >> .env | |
echo "API_KEY=${{ secrets.ALGOLIA_API_KEY }}" >> .env | |
- name: Run cron job | |
run: docker run --env-file=.env -e "CONFIG=$(cat ./config.json | jq -r tostring)" algolia/docsearch-scraper |