-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (41 loc) · 1.19 KB
/
rss.yml
File metadata and controls
46 lines (41 loc) · 1.19 KB
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
name: Generate RSS feed.xml
on:
push:
branches: [ main ] # ← ブランチ名が master なら合わせる
paths:
- "works.html"
- "scripts/generate_feed.py"
workflow_dispatch: {}
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install beautifulsoup4
- name: Generate feed.xml
run: |
python scripts/generate_feed.py
echo "==== ls -l ===="
ls -l
echo "==== head feed.xml ===="
head -n 30 feed.xml || true
- name: Commit & push
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -f feed.xml
if [[ -n "$(git diff --cached --name-only)" ]]; then
git commit -m "chore(rss): auto-generate feed.xml"
git push
else
echo "No changes to commit."
fi