-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40c1177
commit de955ff
Showing
2 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
Binary file not shown.