Skip to content

RSS Scan and MD Generation #925

RSS Scan and MD Generation

RSS Scan and MD Generation #925

Workflow file for this run

name: RSS Scan and MD Generation
on:
schedule:
- cron: "0 0 * * *"
push:
branches:
- master
jobs:
generate_md_from_sitemap:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '14'
- name: Install dependencies
run: npm install --prefix generate_md
- name: Run the script
run: node generate_md/generate_md.js ${{ secrets.GITHUB_TOKEN }}
- name: Remove unnecessary files
run: |
find . -mindepth 1 -type d ! -path './.git*' ! -path './.github*' -print0 | xargs -0 rm -rf
find . -maxdepth 1 -type f -not -name 'rss_links.md' -print0 | xargs -0 rm -f
- name: Commit and push changes
run: |
git config user.name "${{ secrets.USERNAME }}"
git config user.email "${{ secrets.EMAIL }}"
git add .
git commit -m "Update master branch"
git push --force --quiet origin HEAD:refs/heads/rss-md
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}