Fix Layout #13
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: Generate README with Previews | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
generate-readme: | |
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 pillow | |
- name: Generate README | |
run: python scripts/generate_readme.py | |
- name: Commit and push changes | |
env: | |
PAT: ${{ secrets.ACTIONS_PAT }} | |
run: | | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git remote set-url origin https://${PAT}@github.com/${{ github.repository }}.git | |
git add README.md | |
git commit -m "Update README with wallpaper previews" || echo "No changes to commit" | |
git push origin HEAD:main |