Skip to content

Update profile stats cards #70

Update profile stats cards

Update profile stats cards #70

Workflow file for this run

name: Update profile stats cards
on:
schedule:
- cron: '17 6 * * *' # daily
workflow_dispatch:
push:
paths:
- 'stats-cards/**'
- '.github/workflows/update-stats.yml'
permissions:
contents: write
concurrency:
group: update-stats
cancel-in-progress: true
jobs:
render:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: stats-cards/package-lock.json
- name: Install gifsicle
run: sudo apt-get update && sudo apt-get install -y gifsicle
- name: Install dependencies
working-directory: stats-cards
run: npm ci
- name: Fetch stats & render cards
working-directory: stats-cards
run: npm run render
- name: Commit updated cards
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add profile/assets/*.gif
if git diff --cached --quiet; then
echo "No changes"
else
git commit -m "chore: update stats cards [skip ci]"
git push
fi