Download latest Tribuna Liberal issue #629
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: Download latest Tribuna Liberal issue | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
schedule: | |
- cron: '0 12 * * 2,3,4,5,6,0' | |
jobs: | |
downloader: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
# don't need to set ruby version here if you have a .ruby-version file | |
bundler-cache: true | |
- name: Download | |
run: ruby main.rb | |
- name: Commit and push if it changed | |
run: |- | |
git config user.name "Automated" | |
git config user.email "actions@users.noreply.github.com" | |
git add -A | |
timestamp=$(date -u) | |
git commit -m "Latest data: ${timestamp}" || exit 0 | |
git push |