Skip to content

Update Blog Posts

Update Blog Posts #121

name: Update Blog Posts
on:
schedule:
# Runs every day at midnight
- cron: '0 0 * * *'
workflow_dispatch: # Allows manual triggering
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install axios rss-parser
- name: Update README with latest blog posts
run: node scripts/update-readme.js
- name: Commit and push if changed
run: |
git config --global user.email "github-actions@github.com"
git config --global user.name "GitHub Actions"
git add -A
git diff --quiet && git diff --staged --quiet || git commit -m "Update blog posts on README"
git push