Skip to content

Update News Feed Daily #244

Update News Feed Daily

Update News Feed Daily #244

Workflow file for this run

name: Update News Feed Daily
on:
schedule:
- cron: "0 20 * * *" # Currently set to 6 AM Australian EST (20:00 UTC the previous day)
workflow_dispatch: # allows manually trigger if needed
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install feedparser
- name: Run personalised news feed python script
run: |
python main.py
- name: Commit and push changes if needed
run: |
git config user.name 'github-actions'
git config user.email 'actions@github.com'
git add index.html
if git diff --cached --quiet; then
echo "No changes to index.html β€” skipping commit."
else
git commit -m "πŸ”„ Auto-update news feed"
git push
fi