Spaces:
Configuration error
Configuration error
AIGoose commited on
Commit ·
0ddf953
1
Parent(s): 0624752
fix: HyperFrames needs project directory with index.html, not direct file path
Browse files
.github/workflows/render-testimonial.yml
CHANGED
|
@@ -74,19 +74,26 @@ jobs:
|
|
| 74 |
echo "VIDEO_DURATION=$DUR" >> $GITHUB_ENV
|
| 75 |
echo "Duration: ${DUR}s"
|
| 76 |
|
| 77 |
-
- name: Patch composition
|
| 78 |
run: |
|
|
|
|
|
|
|
| 79 |
python3 scripts/patch_composition.py \
|
| 80 |
--input compositions/testimonial.html \
|
| 81 |
-
--output
|
| 82 |
--name "${{ github.event.inputs.participant_name }}" \
|
| 83 |
--role "${{ github.event.inputs.participant_role }}" \
|
| 84 |
--quote "${{ github.event.inputs.pull_quote }}"
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
- name: Lint composition
|
| 89 |
-
run: npx hyperframes lint
|
| 90 |
|
| 91 |
- name: Render to MP4
|
| 92 |
run: |
|
|
@@ -94,8 +101,10 @@ jobs:
|
|
| 94 |
TS=$(date +%Y%m%d-%H%M)
|
| 95 |
OUT="output/dee-testimonial-${TS}.mp4"
|
| 96 |
echo "OUTPUT_FILE=$OUT" >> $GITHUB_ENV
|
| 97 |
-
|
| 98 |
-
|
|
|
|
|
|
|
| 99 |
echo "Rendered: $OUT ($(du -sh $OUT | cut -f1))"
|
| 100 |
|
| 101 |
- name: Upload to Hugging Face dataset
|
|
|
|
| 74 |
echo "VIDEO_DURATION=$DUR" >> $GITHUB_ENV
|
| 75 |
echo "Duration: ${DUR}s"
|
| 76 |
|
| 77 |
+
- name: Patch composition into project folder
|
| 78 |
run: |
|
| 79 |
+
# HyperFrames requires a directory with index.html inside
|
| 80 |
+
mkdir -p project/assets
|
| 81 |
python3 scripts/patch_composition.py \
|
| 82 |
--input compositions/testimonial.html \
|
| 83 |
+
--output project/index.html \
|
| 84 |
--name "${{ github.event.inputs.participant_name }}" \
|
| 85 |
--role "${{ github.event.inputs.participant_role }}" \
|
| 86 |
--quote "${{ github.event.inputs.pull_quote }}"
|
| 87 |
+
# Patch duration
|
| 88 |
+
sed -i "s/data-duration=\"90\"/data-duration=\"${VIDEO_DURATION}\"/" project/index.html
|
| 89 |
+
# Copy the video asset into the project folder (relative path ../assets/ from composition)
|
| 90 |
+
cp assets/testimoni.mp4 project/assets/testimoni.mp4
|
| 91 |
+
echo "Project folder contents:"
|
| 92 |
+
ls -lh project/
|
| 93 |
+
ls -lh project/assets/
|
| 94 |
|
| 95 |
- name: Lint composition
|
| 96 |
+
run: npx hyperframes lint project || true
|
| 97 |
|
| 98 |
- name: Render to MP4
|
| 99 |
run: |
|
|
|
|
| 101 |
TS=$(date +%Y%m%d-%H%M)
|
| 102 |
OUT="output/dee-testimonial-${TS}.mp4"
|
| 103 |
echo "OUTPUT_FILE=$OUT" >> $GITHUB_ENV
|
| 104 |
+
# Pass the project DIRECTORY (not the html file)
|
| 105 |
+
npx hyperframes render project \
|
| 106 |
+
--output "$OUT" \
|
| 107 |
+
--width 1080 --height 1920 --fps 30
|
| 108 |
echo "Rendered: $OUT ($(du -sh $OUT | cut -f1))"
|
| 109 |
|
| 110 |
- name: Upload to Hugging Face dataset
|