Skip to content

Nightly Dashboard Update #5

Nightly Dashboard Update

Nightly Dashboard Update #5

name: Nightly Dashboard Update
on:
schedule:
- cron: '0 5 * * *'
jobs:
update-dashboard:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install python-frontmatter
- name: Generate dashboard.md
run: |
python scripts/json2table.py \
docs/assets/js/all_metadata.json \
docs/_pages/dashboard.md
- name: Commit changes if any
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add docs/_pages/dashboard.md
if ! git diff --cached --quiet; then
git commit -m "chore: nightly update of dashboard.md"
git push
else
echo "No changes to commit"
fi