chore: update thumbs script #3
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 Thumbnails | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
generate-thumbnails: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up GraphicsMagick | |
run: sudo apt-get update && sudo apt-get install -y graphicsmagick | |
- name: Run thumbnail generation script | |
run: | | |
cd posts | |
make thumbs | |
- name: Commit and push changes | |
run: | | |
git config --global user.name 'github-actions' | |
git config --global user.email 'github-actions@github.com' | |
git add . | |
git commit -m "Auto-generate thumbnails" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |