mirror of
https://github.com/Theodor-Springmann-Stiftung/KGPZ.git
synced 2025-10-29 17:15:31 +00:00
Stats file github action
This commit is contained in:
36
.github/workflows/Stats.yml
vendored
Normal file
36
.github/workflows/Stats.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: Update Category Stats
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-stats:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.x'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pip install xml
|
||||||
|
|
||||||
|
- name: Run stats script
|
||||||
|
env:
|
||||||
|
INPUT_DIR: './XML/beitraege' # Path to your XML files directory
|
||||||
|
OUTPUT_FILE: './stats.txt' # Output stats file
|
||||||
|
run: python Scripts/stats.py
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
run: |
|
||||||
|
git config --local user.name "GitHub Actions Bot"
|
||||||
|
git config --local user.email "actions@github.com"
|
||||||
|
git add stats.txt
|
||||||
|
git commit -m "Update stats file on commit"
|
||||||
|
git push
|
||||||
|
continue-on-error: true
|
||||||
Reference in New Issue
Block a user