challenge 959 #36
This file contains 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: Update README | |
on: | |
push: | |
paths: | |
- "**/*.md" | |
- "generate_readme.py" | |
pull_request: | |
paths: | |
- "**/*.md" | |
- "generate_readme.py" | |
jobs: | |
update-readme: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.PAT }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
- name: Update README.md | |
run: python generate_readme.py | |
- name: Commit and Push Changes | |
run: | | |
git config --global user.name "GitHub Actions" | |
git config --global user.email "actions@github.com" | |
git add README.md | |
git commit -m "Update README.md" || echo "No changes to commit" | |
git push |