mirror of
https://github.com/spoopyghosty0/frameport.git
synced 2026-10-21 04:08:11 +02:00
- record_video.py replaces record_tour.py: one storyboard per video with its output, a start state (demo or fresh profile, Frame connected or not, start page, live or frozen stream), setup steps before filming, filmed scenes and instruction cards (eyebrow, heading, numbered steps, a command, a note) for what happens outside FramePort. --changed-since records the videos whose storyboard (or the recorder) changed; several videos record in separate processes. - videos/install.yaml: download, first start, the welcome screen's tool download, the setup command, the command on the Frame (card), connected, scanning a folder, installing and playing a game (81 s). - demo_home profile "fresh": FramePort's first start (empty library, welcome screen, nothing on the Frame); its games wait for the pretend folder scan. Fakes for a first start: no Frame discovery on the real network, the setup command shows the docs' example address, a pretend tool download, steps hooks first_run and pairing_done. - CI records changed (or named) videos; releases attach every docs/media/frameport-<name>.mp4 as FramePort-<name>.mp4. INSTALL.md and README link the tutorial; SHOWCASE.md documents the storyboard format. - Cards are opened by their title in both videos (a card's middle is its Install button).
108 lines
4.1 KiB
YAML
108 lines
4.1 KiB
YAML
name: showcase
|
|
# Docs screenshots and the videos (the demo tour, the install tutorial, …), rendered from the demo library
|
|
# (docs/showcase/, scripts/showcase/; see docs/SHOWCASE.md). Opens or updates one pull request (branch
|
|
# showcase/update) when a picture really changed; the renders are also kept as a workflow artifact either way.
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
videos:
|
|
description: "Videos to record too: names from docs/showcase/videos (e.g. tour install), all, or empty"
|
|
type: string
|
|
default: ""
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- "src/frameport/ui/**"
|
|
- "src/frameport/locales/**"
|
|
- "docs/showcase/**"
|
|
- "scripts/showcase/**"
|
|
|
|
concurrency:
|
|
group: showcase-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
jobs:
|
|
render:
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 60
|
|
env:
|
|
PYTHONUTF8: "1"
|
|
PYTHONIOENCODING: utf-8
|
|
TZ: UTC
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0 # the push's changed files decide whether the video is recorded again
|
|
- uses: astral-sh/setup-uv@v10.2.0
|
|
- name: ffmpeg and fonts
|
|
run: sudo apt-get update && sudo apt-get install -y ffmpeg fonts-roboto fonts-noto-color-emoji
|
|
- run: uv sync --extra dev --python 3.12 # the Python the renders are made with locally
|
|
- name: Chromium for Playwright
|
|
run: uv run playwright install --with-deps chromium
|
|
- name: Store art cache (fetched once from the stores the app uses)
|
|
uses: actions/cache@v6.1.0
|
|
with:
|
|
path: ~/.cache/frameport-showcase
|
|
key: showcase-art-${{ hashFiles('docs/showcase/demo-library.yaml') }}
|
|
restore-keys: showcase-art-
|
|
|
|
- name: Docs screenshots
|
|
run: uv run python scripts/showcase/render_docs.py --keep showcase-out/screenshots
|
|
|
|
- name: Videos
|
|
# a push records the videos whose storyboard (docs/showcase/videos/<name>.yaml) changed, or all of them when
|
|
# the recorder changed (UI tweaks alone don't re-record ~10 MB files); Run workflow records what it's asked
|
|
env:
|
|
INPUT_VIDEOS: ${{ inputs.videos }}
|
|
BEFORE: ${{ github.event.before }}
|
|
run: |
|
|
if [ "$GITHUB_EVENT_NAME" = workflow_dispatch ]; then
|
|
read -ra names <<< "$INPUT_VIDEOS"
|
|
if [ ${#names[@]} -eq 0 ]; then echo "no videos asked for"; exit 0; fi
|
|
[ "${names[0]}" = all ] && names=()
|
|
uv run python scripts/showcase/record_video.py "${names[@]}" --work showcase-out/videos
|
|
else
|
|
uv run python scripts/showcase/record_video.py --changed-since "$BEFORE" --work showcase-out/videos
|
|
fi
|
|
|
|
- name: Keep the renders
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: showcase
|
|
path: |
|
|
showcase-out/screenshots
|
|
showcase-out/videos/*/video.json
|
|
docs/media
|
|
docs/images/tour-teaser.webp
|
|
if-no-files-found: ignore
|
|
retention-days: 14
|
|
|
|
- name: What changed
|
|
id: diff
|
|
run: |
|
|
git status --short -- docs/images docs/media
|
|
if [ -n "$(git status --porcelain -- docs/images docs/media)" ]; then
|
|
echo "changed=true" >> "$GITHUB_OUTPUT"; fi
|
|
- name: Pull request
|
|
if: steps.diff.outputs.changed == 'true' && github.ref == 'refs/heads/main'
|
|
uses: peter-evans/create-pull-request@v8.1.1
|
|
with:
|
|
branch: showcase/update
|
|
delete-branch: true
|
|
add-paths: |
|
|
docs/images/*
|
|
docs/media/*
|
|
commit-message: "Docs: update screenshots and videos"
|
|
title: "Update docs screenshots and videos"
|
|
body: |
|
|
Rendered by the `showcase` workflow from the demo library (docs/showcase/demo-library.yaml) with a
|
|
pretend Frame: only pictures that visibly changed are included. Look them over before merging (the
|
|
run's `showcase` artifact has every render).
|
|
|
|
Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|