-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (27 loc) · 1006 Bytes
/
traffic.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# This workflow initializes a Python environment and executes
# the specified .py file/s at a scheduled time of 12:45am
# each day. In this case the traffic.py file located in the
# /src directory of this repository.
name: GitHub Traffic Metrics
on:
# push:
# branches:
# - main
schedule:
- cron: '45 0 * * *' # Runs at 12:45am 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.txt # Contains any dependencies that are not part of the Python standard library
- name: Run Python script to extract traffic
env:
TOKEN: ${{ secrets.DATA_TOKEN }}
run: python src/traffic.py # Extract GitHub traffic and append to CSV