Scrape latest data #1491
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: Scrape latest data | |
on: | |
schedule: | |
- cron: '14 10 * * *' | |
workflow_dispatch: {} | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6 | |
- name: Install dependencies | |
run: bundle install | |
- name: Scrape official site | |
run: bundle exec ruby bin/scraper/official.rb | tee data/official.csv | |
- name: Get current wikidata list | |
run: bundle exec ruby bin/scraper/wikidata.rb | tee data/wikidata.csv | |
- name: Generate diff | |
run: bundle exec ruby bin/diff.rb | tee data/diff.csv | |
- name: Create pull request | |
id: cpr | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
commit-message: Automated update | |
committer: GitHub <[email protected]> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
branch: legislature-compare | |
delete-branch: true | |
title: 'Compare legislature' | |
assignees: tmtmtmtm | |
reviewers: tmtmtmtm | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |