Skip to content

GitHub Plot - Views by Day #542

GitHub Plot - Views by Day

GitHub Plot - Views by Day #542

# This workflow initializes a Python environment and executes
# the specified .py file/s at a scheduled time of 12:25am
# each day. In this case the plot-views-by-day.py file located
# in the /src directory of this repository.
name: GitHub Plot - Views by Day
on:
# push:
# branches:
# - main
schedule:
- cron: '25 0 * * *' # Runs at 12:25am UTC every day
jobs:
extract-data:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install -r requirements-plot.txt # Contains any dependencies that are not part of the Python standard library
- name: Run Python script to Generate and save plot
env:
TOKEN: ${{ secrets.DATA_TOKEN }}
run: python src/plot-views-by-day.py # Extract GitHub activity and append to CSV