Skip to content

Update Front Matter #63

Update Front Matter

Update Front Matter #63

name: Update Front Matter
on:
schedule:
- cron: '0 0 */2 * *' # Runs at 00:00 UTC every 2 days
jobs:
update-front-matter:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install Dependencies
run: npm install gray-matter glob
- name: Update Front Matter in Markdown Files
run: node update_frontmatter.mjs
- name: Commit changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git add -A
git diff --staged --quiet || git commit -m "Update front matter tags based on dates"
git push