🔁 RunParsers #1623
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: 🔁 RunParsers | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- 'docs/**' | |
- 'luxembourg/**' | |
schedule: | |
- cron: "31 6,8 * * *" # UTC | |
- cron: "59 23 * * 0" # Run once sunday night | |
concurrency: | |
group: parsers-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
generateXMLFeeds: | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install requirements.txt | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: git config | |
run: | | |
git config --global user.name github-actions | |
git config --global user.email 41898282+github-actions[bot]@users.noreply.github.com | |
git pull --ff-only | |
- name: Run parsers & update xml feeds | |
env: | |
HEIDELBERG_AUTH: ${{ secrets.HEIDELBERG_AUTH }} | |
MANNHEIM_AUTH: ${{ secrets.MANNHEIM_AUTH }} | |
run: | | |
python updateFeeds.py -meta -feed -json -index | |
- name: git commit & push | |
if: always() | |
run: | | |
touch docs/.nojekyll | |
git add docs | |
# Use "|| true" or "--allow-empty" otherwise the action fails for empty commits | |
git commit -m "Updated xml feeds" || true | |
git push | |
- name: Test files in github pages | |
if: always() | |
run: | | |
python tests/test_ghpages.py |