Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/public/videos/create-workflow-on-github.vtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
WEBVTT

00:00:00.000 --> 00:00:08.000
Demo: Create a GitHub Agentic Workflow from the GitHub web interface.

00:00:08.000 --> 00:00:18.000
The demo shows authoring workflow instructions, saving the file, and running the workflow.
7 changes: 7 additions & 0 deletions docs/public/videos/install-and-add-workflow-in-cli.vtt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
WEBVTT

00:00:00.000 --> 00:00:07.000
Demo: Install GitHub Agentic Workflows in the GitHub CLI and add a sample workflow.

00:00:07.000 --> 00:00:16.000
The demo shows setup, creating a workflow file, and triggering the first run.
14 changes: 13 additions & 1 deletion docs/src/components/Video.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ interface Props {
src: string
caption?: string
title?: string
captionsSrc?: string
captionsLang?: string
captionsLabel?: string
aspectRatio?: '16:9' | '4:3' | '1:1' | 'auto'
showControls?: boolean
autoStart?: boolean
Expand All @@ -16,6 +19,9 @@ const {
src,
caption,
title,
captionsSrc,
captionsLang = 'en',
captionsLabel = 'English',
aspectRatio = 'auto',
showControls = true,
autoStart = false,
Expand Down Expand Up @@ -57,6 +63,9 @@ const fallbackLabel = src
?.replace(/\.[^.]+$/, '')
.replace(/[-_]+/g, ' ')
const accessibilityLabel = title || caption || fallbackLabel
const fallbackLinkLabel = accessibilityLabel
? `Download ${accessibilityLabel}`
: 'Download this video'
---

<div class="gh-aw-video-wrapper" style={`max-width: ${maxWidth};`}>
Expand All @@ -74,7 +83,10 @@ const accessibilityLabel = title || caption || fallbackLabel
aria-label={accessibilityLabel}
>
<source src={src} type={contentType} />
<p>Your browser doesn't support HTML5 video. Download the video <a href={src}>here</a>.</p>
{captionsSrc && (
<track kind="captions" src={captionsSrc} srclang={captionsLang} label={captionsLabel} />
)}
<p>Your browser doesn't support HTML5 video. <a href={src}>{fallbackLinkLabel}</a>.</p>
</video>
</div>
{caption && (
Expand Down
2 changes: 2 additions & 0 deletions docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ Install the extension, add a sample workflow, and trigger your first run - all f
<Video
src="/gh-aw/videos/install-and-add-workflow-in-cli.mp4"
title="Install and add workflow in CLI demo video"
captionsSrc="/gh-aw/videos/install-and-add-workflow-in-cli.vtt"
aspectRatio="16:9"
/>

Expand All @@ -180,5 +181,6 @@ Create custom agentic workflows directly from the GitHub web interface using nat
<Video
src="/gh-aw/videos/create-workflow-on-github.mp4"
title="Create workflow on GitHub demo video"
captionsSrc="/gh-aw/videos/create-workflow-on-github.vtt"
aspectRatio="16:9"
/>
20 changes: 20 additions & 0 deletions docs/tests/homepage-links.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,24 @@ test.describe('Homepage Links', () => {
'Create workflow on GitHub demo video'
);
});

test('should use descriptive fallback links and captions tracks on homepage videos', async ({ page }) => {
Copy link

Copilot AI Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test name has a grammatical typo: "captions tracks" should be "caption tracks" (or "caption tracks") to read correctly.

Suggested change
test('should use descriptive fallback links and captions tracks on homepage videos', async ({ page }) => {
test('should use descriptive fallback links and caption tracks on homepage videos', async ({ page }) => {

Copilot uses AI. Check for mistakes.
const fallbackLinks = page.locator('video.gh-aw-video-element p a');
await expect(fallbackLinks).toHaveCount(2);

await expect(fallbackLinks.nth(0)).toHaveText('Download Install and add workflow in CLI demo video');
await expect(fallbackLinks.nth(1)).toHaveText('Download Create workflow on GitHub demo video');

const captionTracks = page.locator('video.gh-aw-video-element track[kind="captions"]');
await expect(captionTracks).toHaveCount(2);

await expect(captionTracks.nth(0)).toHaveAttribute(
'src',
'/gh-aw/videos/install-and-add-workflow-in-cli.vtt'
);
await expect(captionTracks.nth(1)).toHaveAttribute(
'src',
'/gh-aw/videos/create-workflow-on-github.vtt'
);
});
});
Loading