Download new pages from regeringen.se #206
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 new pages from regeringen.se | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * *" # 1AM UTC every day | |
jobs: | |
download: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
with: | |
ref: "data" | |
path: "data" | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "pip" | |
- run: pip install -r requirements.txt | |
- name: Fetch the data | |
run: python fetch.py | |
- name: Commit and Push | |
run: | | |
cd ./data | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
git add . | |
git commit -m "Update the data" || echo "Nothing to push" | |
git push |