Skip to content

🎥 Make videos programmatically with React

Add back GitHub Action to Stargazer template

Jonny Burger2f9e5d9ff929
diff --git a/packages/template-stargazer/.github/workflows/render-video.yml b/packages/template-stargazer/.github/workflows/render-video.yml
new file mode 100644
index 0000000000..ed34fb5a17
--- /dev/null
+++ b/packages/template-stargazer/.github/workflows/render-video.yml
@@ -0,0 +1,51 @@
+on:
+ workflow_dispatch:
+ inputs:
+ repoOrg:
+ description: "Repo Org"
+ required: true
+ default: "pomber"
+ repoName:
+ description: "Repo Name"
+ required: true
+ default: "didact"
+ starCount:
+ description: "Star Count"
+ required: true
+ default: "100"
+ duration:
+ description: "Duration (seconds)"
+ required: false
+ default: "15"
+name: Render video
+jobs:
+ render:
+ name: Render video
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@main
+ - name: Setup node
+ uses: actions/setup-node@v3
+ with:
+ node-version: 16
+ - name: Install Fallback fonts (fonts)
+ run: |
+ sudo apt-get update -yqq
+ sudo apt-get install -yq --no-install-recommends \
+ fonts-noto-core fonts-noto-cjk fonts-noto-color-emoji fonts-noto-mono
+ - name: Install dependencies (node modules)
+ run: npm i
+ - name: Define input props
+ run: echo $WORKFLOW_INPUT | tee input-props.json | jq -C '.' # Inject to file, inspect to logs
+ env:
+ WORKFLOW_INPUT: ${{ toJson(github.event.inputs) }}
+ - name: Render video
+ run: npm run build -- --props="./input-props.json"
+ env:
+ REMOTION_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Upload video
+ uses: actions/upload-artifact@v3
+ with:
+ name: out.mp4
+ path: out/Main.mp4