-
-
Notifications
You must be signed in to change notification settings - Fork 71
47 lines (39 loc) · 1.03 KB
/
main.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
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Run Python Script
on:
push:
branches:
- main
jobs:
run_script:
runs-on: ubuntu-latest
steps:
- name: Set up Node.js 16
uses: actions/setup-node@v2
with:
node-version: 16
- name: Check out repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install google-api-python-client
- name: Run Python script
run: |
python --version
pwd
ls
python extract-data.py
working-directory: ${{ github.workspace }}
env:
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update data.json from GitHub Action" || echo "No changes to commit"
git push