Skip to content

Corona-Dashboard-Scraper #5649

Corona-Dashboard-Scraper

Corona-Dashboard-Scraper #5649

Workflow file for this run

name: Corona-Dashboard-Scraper
on:
push:
schedule:
- cron: '6 8,9,10,11,17 * * *'
jobs:
scrape-data:
name: Scrape, commit and push
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install dependencies
shell: bash
run: |
sudo gem install bundler -v "$(grep -A 1 "BUNDLED WITH" Gemfile.lock | tail -n 1)"
sudo gem update bundler
bundle install
- name: Run Scraper
shell: bash
run: |
make data
- name: Commit and push if it changed
shell: bash
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
timestamp=$(date "+%Y-%m-%d")
# the commands after the || only run if git diff detects any changes
git diff --quiet || make README.md && git add README.md data/target && git commit -m "add ${timestamp}" && true
git push