Skip to content

Commit a8c1525

Browse files
committed
added github actions workflow for video downloading
1 parent ad3c9b7 commit a8c1525

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/download_yt.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
on:
2+
push:
3+
branches: [all]
4+
pull_request:
5+
branches: [all]
6+
workflow_dispatch:
7+
8+
jobs:
9+
download_video:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
- name: Setup Python
15+
- uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.13'
18+
- name: Install dependencies
19+
run: |
20+
python3 -m pip install --upgrade pip
21+
pip install yt-dlp
22+
23+
- name: Create video downloads directory
24+
run: mkdir -p downloads
25+
26+
- name: Download Youtube video
27+
run: |
28+
cd downloads
29+
python3 ../utils/download_yt.py
30+
# check if vid downloaded correctly
31+
ls -la ./
32+
33+
- name: Upload downloaded vids to artifact
34+
uses: actions/upload-artifact
35+
with:
36+
name: download-video
37+
path: downloads/
38+
retention-days: 7

0 commit comments

Comments
 (0)