Update Front Matter #2
This file contains 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: 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 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install python-frontmatter pyyaml | |
- name: Update Front Matter in Markdown Files | |
run: python3 update_frontmatter.py | |
- 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 |