Generate RSS Feed #8073
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: Generate RSS Feed | |
| on: | |
| schedule: | |
| - cron: '*/30 * * * *' # every 30 minutes | |
| workflow_dispatch: # manual trigger | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| pip install requests beautifulsoup4 feedgen | |
| - name: Generate RSS feed | |
| run: python generate_feed.py | |
| - name: Commit and push feed | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git add docs/feed.xml | |
| git commit -m "Update feed" || echo "No changes to commit" | |
| git push origin main --force | |