Skip to content

Extract and validate mortality data from 'SICO - eVM' #1378

Extract and validate mortality data from 'SICO - eVM'

Extract and validate mortality data from 'SICO - eVM' #1378

name: Extract and validate mortality data from 'SICO - eVM'
on:
schedule:
- cron: "0 3 * * *"
jobs:
build:
runs-on: ubuntu-latest
container: python:3
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Configure pt_PT locale
run: |
apt-get update -y && apt-get install -y locales && echo "pt_PT.UTF-8 UTF-8" | tee -a /etc/locale.gen && locale-gen pt_PT.UTF-8
- name: Configure pt_PT (Europe/Lisbon) timezone
run: |
ln -fs /usr/share/zoneinfo/Europe/Lisbon /etc/localtime && dpkg-reconfigure --frontend noninteractive tzdata
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r scripts/requirements.txt
- name: Scrap mortality from SICO - eVM
run: python scripts/scraping.py
- name: Set safe directory
run: git config --global --add safe.directory /__w/dados-SICOeVM/dados-SICOeVM
- name: Commit changes
uses: stefanzweifel/[email protected]
with:
commit_message: Update mortality data
branch: ${{ github.head_ref }}
- name: Auto publish update to Twitter
run: python .github/workflows/tweet.py
env:
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
TWITTER_ACCESS_SECRET: ${{ secrets.TWITTER_ACCESS_SECRET }}
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}