mirror of
https://github.com/SrIzan10/YSWS-Catalog.git
synced 2026-05-01 11:15:09 +00:00
38 lines
887 B
YAML
38 lines
887 B
YAML
name: Generate RSS Feed
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'data.yml'
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
generate-rss:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
|
|
- name: Install dependencies
|
|
run: npm install js-yaml
|
|
|
|
- name: Generate RSS feed
|
|
run: node generate-rss.js
|
|
|
|
- name: Commit and push if changed
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add feed.xml
|
|
git diff --quiet && git diff --staged --quiet || git commit -m "Update RSS feed"
|
|
git pull --rebase
|
|
git push
|