Skip to content

RSS Feed Generator

RSS Feed Generator #10

name: "RSS Feed Generator"
on:
workflow_dispatch:
inputs:
UPDATE_ONLY:
description: "Only update the RSS feed without deploying"
type: boolean
default: false
# Run after issue handling or transcript polling
workflow_run:
workflows: ["Handle GitHub Issue", "Zoom Transcript Poller", "YouTube Video Uploader"]
types:
- completed
jobs:
generate-rss:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .github/ACDbot/
pip install pytz
pip install -r .github/ACDbot/requirements.txt
- name: Generate RSS feed
run: |
python .github/ACDbot/scripts/serve_rss.py --update-only
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZOOM_CLIENT_ID: ${{ secrets.ZOOM_CLIENT_ID }}
ZOOM_CLIENT_SECRET: ${{ secrets.ZOOM_CLIENT_SECRET }}
ZOOM_ACCOUNT_ID: ${{ secrets.ZOOM_ACCOUNT_ID }}
ZOOM_ALTERNATIVE_HOSTS: ${{ secrets.ZOOM_ALTERNATIVE_HOSTS }}
DISCOURSE_API_KEY: ${{ secrets.DISCOURSE_API_KEY }}
DISCOURSE_API_USERNAME: ${{ secrets.DISCOURSE_API_USERNAME }}
DISCOURSE_BASE_URL: ${{ vars.DISCOURSE_BASE_URL }}
GCAL_SERVICE_ACCOUNT_KEY: ${{ secrets.GCAL_SERVICE_ACCOUNT_KEY }}
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ vars.TELEGRAM_CHAT_ID }}
SENDER_EMAIL: ${{ secrets.SENDER_EMAIL }}
SENDER_EMAIL_PASSWORD: ${{ secrets.SENDER_EMAIL_PASSWORD }}
SMTP_SERVER: ${{ secrets.SMTP_SERVER }}
- name: Commit and push RSS feed
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add .github/ACDbot/rss/meetings.xml
git commit -m "Update RSS feed" || echo "No changes to commit"
git push
# Deploy to GitHub Pages if not update-only
- name: Deploy to GitHub Pages
if: ${{ !inputs.UPDATE_ONLY }}
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: .github/ACDbot/rss
branch: gh-pages
target-folder: rss
permissions:
contents: write
pages: write