Update Subreddit Feeds #2918
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: Update Subreddit Feeds | |
on: | |
schedule: | |
- cron: "*/15 * * * *" # Runs every 15 minutes | |
workflow_dispatch: | |
jobs: | |
update_rss: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
pip install feedparser feedgen requests | |
- name: Run update_feeds script | |
run: | | |
python scripts/update_feeds.py | |
- name: commit files | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit --allow-empty -m "update Reddit feeds" -a | |
git push |