Scrape #44504
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: Scrape | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "1,16,31,46 * * * *" | |
jobs: | |
scheduled: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out this repo | |
uses: actions/checkout@v3 | |
- name: Scrape stations | |
run: python scripts/scrape_stations.py | |
env: | |
JCDECAUX_API_KEY: ${{ secrets.JCDECAUX_API_KEY }} | |
- name: Scrape weather | |
if: always() | |
run: python scripts/scrape_weather.py | |
- name: Commit and push if it changed | |
if: always() | |
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 |