Skip to content

Download New Data

Download New Data #465

Workflow file for this run

name: Download New Data
on:
workflow_dispatch:
schedule:
- cron: '10 */8 * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: 3.9
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements-download.txt
python -m spacy download en_core_web_sm
python -m pip install -e .
- name: Fetch latest data
run: python -m frontpage download
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push