-
Notifications
You must be signed in to change notification settings - Fork 370
77 lines (67 loc) · 2.57 KB
/
rss-feed-generator.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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