Skip to content

algolia-scraper

algolia-scraper #1182

name: algolia-scraper
on:
push:
branches:
- master
workflow_dispatch:
schedule:
- cron: "0 1 * * *" #runs at 01:00 UTC everyday
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: check out code 🛎
uses: actions/checkout@v3
# when scraping the site, inject secrets as environment variables
# then pass their values into the Docker container using "-e" syntax
# and inject config.json contents as another variable
- name: scrape the site 🧽
env:
ALGOLIA_APPLICATION_ID: ${{ secrets.ALGOLIA_APPLICATION_ID }}
ALGOLIA_WRITE_API_KEY: ${{ secrets.ALGOLIA_WRITE_API_KEY }}
ALGOLIA_SITE_URL: ${{ secrets.ALGOLIA_SITE_URL }}
ALGOLIA_INDEX_NAME: ${{ secrets.ALGOLIA_INDEX_NAME }}
run: |
cd .algolia
touch .env
./scrape.sh