-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (46 loc) · 1.29 KB
/
fetch-data.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
name: Fetch data
on:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
jobs:
fetch-data:
runs-on: ubuntu-22.04
timeout-minutes: 10
permissions:
contents: write
strategy:
fail-fast: true
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup-python-poetry
with:
python-version: 3.11.4
poetry-version: 1.8.2
path: kos-loader
- name: Fetch data
working-directory: kos-loader
shell: bash
env:
KOS_USERNAME: ${{ secrets.KOS_USERNAME }}
KOS_PASSWORD: ${{ secrets.KOS_PASSWORD }}
LOGLEVEL: info
run: poetry run python3 -m kos_loader.kos_loader build/data.json
- name: 'Upload Artifact'
uses: actions/upload-artifact@v4
with:
name: timetable-data
path: kos-loader/build/data.json
retention-days: 3
- name: Push git subdirectory as branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: data
folder: kos-loader/build
token: ${{ secrets.GITHUB_TOKEN }}
git-config-name: 'github-actions[bot]'
git-config-email: 'github-actions[bot]@users.noreply.github.com'
single-commit: true
commit-message: "Update data"