mirror of
https://github.com/mustbeperfect/definitive-opensource.git
synced 2026-04-18 06:54:07 +02:00
Added workflow to generate README
This commit is contained in:
35
.github/workflows/generate-readme.yml
vendored
35
.github/workflows/generate-readme.yml
vendored
@@ -1 +1,36 @@
|
||||
|
||||
name: Generate README
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'source/data/applications.json'
|
||||
- 'source/data/categories.json'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt || true
|
||||
|
||||
- name: Run script to generate README
|
||||
run: python source/scripts/readme_generator.py
|
||||
|
||||
- name: Commit and push changes
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add README.md
|
||||
git diff --quiet && git diff --staged --quiet || git commit -m "Auto-generate README from JSON"
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user