name: Daily News Scraper on: schedule: # Runs every day at 00:00 UTC (8:00 AM PHT) - cron: '0 0 * * *' workflow_dispatch: # Allows manual trigger from GitHub UI jobs: scrape: 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.12' - name: Install dependencies run: pip install feedparser - name: Run scraper run: python scraper/news_scraper.py - name: Commit updated database run: | git config user.name "GitHub Actions Bot" git config user.email "actions@github.com" git add data/news.db git diff --staged --quiet || git commit -m "Auto-update: scraped news articles $(date -u +'%Y-%m-%d')" git push