Skip to content

Commit 32199fd

Browse files
authored
Create track-traffic.yml
1 parent c88ee08 commit 32199fd

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Track GitHub Traffic
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 0' # Runs weekly (every Sunday at midnight UTC)
5+
workflow_dispatch: # Allows manual triggering as well
6+
jobs:
7+
fetch-traffic:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout Code
11+
uses: actions/checkout@v3
12+
13+
- name: Set Up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.9'
17+
18+
- name: Install Dependencies
19+
run: |
20+
pip install requests gspread oauth2client
21+
22+
- name: Fetch Traffic Data
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
run: |
26+
python fetch_traffic.py

0 commit comments

Comments
 (0)