Building videos using GitHub actions

For users that want to keep video scripts and assets on GitHub, we support directly building videos using GitHub actions.

Getting your API Key

To use the GitHub action, you will need a Narakeet API key.

For information on how to get a key, check out our guide on Managing API Keys.

We strongly suggest storing your API key as an encrypted secret

Configuring the GitHub action

Use the action narakeet/build-video-github-action step with the following three parameters:

  • source-path: the path to the main video script file in your repository
  • api-key: your API key.
  • github-token: set to ${{ secrets.GITHUB_TOKEN }} (GitHub will automatically assign it)

The action has the following outputs:

  • video-file: video file (MP4)
  • video-url: Temporary secure (signed) video URL, valid for 10 minutes
  • poster-file: the video poster file (JPG)
  • poster-url: Temporary secure (signed) URL for the video poster file (JPG), valid for 10 minutes
  • srt-file: subtitle (SRT) file
  • srt-url: Temporary secure (signed) SRT URL, valid for 10 minutes
  • vtt-file: subtitle (VTT) file
  • vtt-url: Temporary secure (signed) VTT URL, valid for 10 minutes

An example

The following workflow will generate a video and upload it to the workflow artifacts. You can then pass it on to the next action, or download directly from the workflow artifact page.

name: Make videos
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: narakeet/build-video-github-action@v1.0.5
      id: video
      with:
        source-path: hello-world/script/script.md
        github-token: ${{ secrets.GITHUB_TOKEN }}
        api-key: ${{ secrets.API_KEY }}
    - uses: actions/upload-artifact@v1
      with:
        name: video
        path: "${{ steps.video.outputs.video-file }}" 

More information