Skip to content

Stats workflow

Stats workflow #57

Workflow file for this run

# This workflow check instructions in articles
name: Stats workflow
# Controls when the action will run.
on:
# Triggers the workflow on the 19th every month
schedule:
- cron: '0 8 * * 4'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Generate report of outdated articles
report:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Check out repo and the whole history
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
# Report outdated files, store result as artifact and updates stats
- name: Generate stat report
run: |
pip install -r tools/requirements.txt
python3 tools/maintenance.py
# Commit stats
- name: Commit stats
run: |
git config user.name github-actions
git config user.email [email protected]
git add content/stats/data.json
git pull
git commit -m "Update stats"
# Push stats
- name: Push stats
uses: ad-m/github-push-action@master