Skip to content

Scraper

Scraper #132

Workflow file for this run

name: Scraper
on:
schedule:
- cron: '0 5 * * MON'
workflow_dispatch:
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.SCRAPER_APP_ID }}
private-key: ${{ secrets.SCRAPER_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run scraper
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
bundle exec rake scraper
sed -i -e 's/ $//' db/data/*.yml
git add db/data
- name: Upload screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: scraper_screenshot
path: ./tmp/capybara
retention-days: 2