algolia-scraper #1178
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-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 |