-
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (51 loc) · 1.45 KB
/
updateFeed.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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