Add more projects #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate README | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'projects/**' | |
| - '.github/workflows/generate-readme.yml' | |
| - 'templates/README.template.md' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate-readme: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyyaml | |
| - name: Generate README | |
| run: | | |
| python scripts/generate_readme.py | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name 'GitHub Action' | |
| git config --global user.email '[email protected]' | |
| git add README.md | |
| git diff --quiet && git diff --staged --quiet || (git commit -m "docs: Auto-update README" && git push) |