-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.52 KB
/
gen.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
48
49
50
51
52
53
54
55
56
57
58
name: Generate Video
on:
workflow_dispatch:
inputs:
scriptInput:
description: 'Text script input (required)'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # You can specify a specific Python version here
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
sudo apt-get install -y libmagick++-dev
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install moviepy pytube gtts
# Make downloader.sh and generate.sh scripts executable
- name: Make scripts executable
run: |
chmod +x models/downloader.sh
chmod +x generate.sh
# Run downloader.sh script
- name: Run downloader.sh
run: ./models/downloader.sh large-v1
# Generate the video using the provided text script
- name: Generate Video
run: |
# Accessing the input provided by the user
script="${{ github.event.inputs.scriptInput }}"
# Run the generate.sh script with the provided text as argument
./generate.sh "$script"
# Upload the generated video as an artifact
- name: Upload Video Artifact
uses: actions/upload-artifact@v2
with:
name: final_video_with_audio
path: final_video_with_audio.mp4