Files
definitive-opensource-mustb…/.github/workflows/generate-readme.yml
2026-01-12 09:23:41 -08:00

50 lines
1.2 KiB
YAML

name: Generate README
on:
# push:
# paths:
# - 'core/data/**'
# - 'core/components/**'
workflow_dispatch:
schedule:
- cron: '0 1 * * *' # Every day at midnight UTC
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: 'pyproject.toml'
- name: Install UV
uses: astral-sh/setup-uv@v7
- name: Install project
run: uv sync --no-dev
- name: Run script to generate README
run: uv run ./core/source/generation/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 source/testing/test.md
git add readmes/
git add README.md
git diff --quiet && git diff --staged --quiet || git commit -m "Generate READMEs"
git push