Update Blog Posts #286
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: Update Blog Posts | |
| on: | |
| schedule: | |
| # Every 6 hours | |
| - cron: "0 */6 * * *" | |
| workflow_dispatch: # Allow manual trigger | |
| jobs: | |
| update-blog-posts: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Fetch blog posts and update README | |
| run: python scripts/update_blog_posts.py | |
| - name: Check for changes | |
| id: changes | |
| run: | | |
| git diff --quiet profile/README.md || echo "changed=true" >> "$GITHUB_OUTPUT" | |
| - name: Commit and push changes | |
| if: steps.changes.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add profile/README.md | |
| git commit -m "Update blog posts from tabularis.dev sitemap" | |
| git push |