Skip to content

Scrape latest data #17739

Scrape latest data

Scrape latest data #17739

Workflow file for this run

name: Scrape latest data
on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install newsapi-python
- name: Run script
env:
FIRSTAPI: ${{ secrets.FIRSTAPI }}
SECONDAPI: ${{ secrets.SECONDAPI }}
THIRDAPI: ${{ secrets.THIRDAPI }}
FOURTHAPI: ${{ secrets.FOURTHAPI }}
FIFTHAPI: ${{ secrets.FIFTHAPI }}
SIXTHAPI: ${{ secrets.SIXTHAPI }}
SEVENTHAPI: ${{ secrets.SEVENTHAPI }}
run: |
python main.py
- 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 --allow-empty -m "Latest data: ${timestamp}" || exit 0
git push