Skip to content

Crawler

Crawler #923

Workflow file for this run

name: Crawler
on:
push:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
crawl:
name: ITU-R documents fetching
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0
- name: Update gems
run: |
gem install bundler
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Fetch documents
run: bundle exec ruby crawler.rb
- name: Push data
run: |
echo `date` > flag.txt
git config user.name github-actions
git config user.email github-actions@github.com
git add data/* flag.txt
git diff --quiet && git diff --staged --quiet || (git commit -m 'update documents' && git push)