🎥 Make videos programmatically with React
Docs: Fix example for using GitHub Actions
Jonny Burgerdf7cffc03994
diff --git a/packages/docs/docs/ssr.mdx b/packages/docs/docs/ssr.mdxindex e0dd41370b..a546527b0d 100644--- a/packages/docs/docs/ssr.mdx+++ b/packages/docs/docs/ssr.mdx@@ -21,14 +21,69 @@ See an [example](/docs/ssr-node) or the [API reference](/docs/renderer) for more## Render using GitHub Actions-The [Hello World starter template](https://github.com/remotion-dev/template-helloworld) includes a GitHub Actions workflow file [`.github/workflows/render-video.yml`](https://github.com/remotion-dev/template-helloworld/blob/main/.github/workflows/render-video.yml).--<Step>1</Step> Commit the template to a GitHub repository.<br/>-<Step>2</Step> On GitHub, click the <code>Actions</code> tab.<br/>-<Step>3</Step> Select the <code>Render video</code> workflow on the left.<br/>-<Step>4</Step> A <code>Run workflow</code> button should appear. Click it.<br/>-<Step>5</Step> Fill in the props of the root component and click <code>Run workflow</code>. <br/>-<Step>6</Step> After the rendering is finished, you can download the video under <code>Artifacts</code>.<br/><br/>+You can render a video on GitHub actions. The following workflow assumes a composition ID of `MyComp`++```yaml+name: Render video+on:+ workflow_dispatch:+jobs:+ render:+ name: Render video+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@main+ - uses: actions/setup-node@main+ - run: npm i+ - run: npx remotion render MyComp out/video.mp4+ - uses: actions/upload-artifact@v2+ with:+ name: out.mp4+ path: out/video.mp4+```++### With input props++If you have props, you can ask for them using the GitHub Actions input fields.+Here we assume a shape of `{titleText: string; titleColor: string}`.++```yaml+name: Render video+on:+ workflow_dispatch:+ inputs:+ titleText:+ description: 'Which text should it say?'+ required: true+ default: 'Welcome to Remotion'+ titleColor:+ description: 'Which color should it be in?'+ required: true+ default: 'black'+jobs:+ render:+ name: Render video+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@main+ - uses: actions/setup-node@main+ - run: npm i+ - run: echo $WORKFLOW_INPUT > input-props.json+ env:+ WORKFLOW_INPUT: ${{ toJson(github.event.inputs) }}+ - run: npx remotion render MyComp out/video.mp4 --props="./input-props.json"+ - uses: actions/upload-artifact@v2+ with:+ name: out.mp4+ path: out/video.mp4+```++<Step>1</Step> Commit the template to a GitHub repository.<br />+<Step>2</Step> On GitHub, click the <code>Actions</code> tab.<br />+<Step>3</Step> Select the <code>Render video</code> workflow on the left.<br />+<Step>4</Step> A <code>Run workflow</code> button should appear. Click it.<br />+<Step>5</Step> Fill in the props of the root component and click <code>Run workflow</code>.<br />+<Step>6</Step> After the rendering is finished, you can download the video under <code>Artifacts</code>.<br />Note that running the workflow may incur costs. However, the workflow will only run if you actively trigger it.