Merge branch 'main' of https://github.com/kadubon/github.io #157
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.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 | |