Skip to content

Generate Stats Images #945

Generate Stats Images

Generate Stats Images #945

Workflow file for this run

name: Generate Stats Images
on:
push:
branches: [ main ]
schedule:
- cron: "5 0 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: 'x64'
cache: pip
- name: Install dependencies
run: pip3 install -q -r requirements.txt
- name: Generate statistics
run: python3 generate_images.py
env:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EXCLUDED: ${{ secrets.EXCLUDED }}
EXCLUDED_LANGS: ${{ secrets.EXCLUDED_LANGS }}
EXCLUDE_FORKED_REPOS: true
- uses: actions/upload-artifact@v3
with:
name: svgs
path: generated
commit:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: svgs
path: generated
- run: |
git config user.name "github-actions"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add generated
git commit -m 'Update generated files' || echo
git push --force origin HEAD:gh-pages