Skip to content

Commit a7466b6

Browse files
authored
Actions video (github#16744)
* Support video frontmatter * Add CSP rule * Actually put in the video
1 parent c0b7195 commit a7466b6

File tree

4 files changed

+24
-3
lines changed

4 files changed

+24
-3
lines changed

content/actions/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ changelog:
3737
- title: Self-Hosted Runner Group Access Changes
3838
date: '2020-10-16'
3939
href: https://github.blog/changelog/2020-10-16-github-actions-self-hosted-runner-group-access-changes/
40+
41+
product_video: https://www.youtube-nocookie.com/embed/cP0I9w2coGU
4042

4143
redirect_from:
4244
- /articles/automating-your-workflow-with-github-actions/

layouts/product-landing.html

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
{% include header %}
1010

1111
<div class="container-xl px-3 px-md-6 pt-3 pb-2">
12-
<header class="d-flex gutter mb-6">
13-
<div class="col-12 col-lg-7">
12+
<header class="d-lg-flex gutter-lg mb-6">
13+
<div class="col-12 col-lg-6 mb-2 mb-lg-0">
1414
<span class="text-mono text-gray">Product</span>
1515
<h1 class="mb-3 font-mktg">{{ page.shortTitle }}</h1>
1616
<div class="lead-mktg text-gray">{{ page.intro }}</div>
@@ -23,6 +23,19 @@ <h1 class="mb-3 font-mktg">{{ page.shortTitle }}</h1>
2323
{% data ui.product_landing.reference_guides %}
2424
</a>
2525
</div>
26+
27+
{% if page.product_video %}
28+
<div class="col-12 col-lg-6">
29+
<div class="position-relative" style="padding-bottom:56.25%;">
30+
<iframe
31+
class="top-0 left-0 position-absolute box-shadow-large rounded-1 width-full height-full"
32+
src="{{ page.product_video }}"
33+
frameborder="0"
34+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
35+
></iframe>
36+
</div>
37+
</div>
38+
{% endif %}
2639
</header>
2740

2841
<!-- Article links -->

lib/frontmatter.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ const schema = {
8888
}
8989
}
9090
},
91+
// Show in `product-landing.html`
92+
product_video: {
93+
type: 'string',
94+
format: 'url'
95+
},
9196
interactive: {
9297
type: 'boolean'
9398
}

middleware/csp.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ module.exports = contentSecurityPolicy({
3434
],
3535
frameSrc: [ // exceptions for GraphQL Explorer
3636
'https://graphql-explorer.githubapp.com', // production env
37-
'http://localhost:3000' // development env
37+
'http://localhost:3000', // development env
38+
'https://www.youtube-nocookie.com'
3839
],
3940
styleSrc: [
4041
"'self'",

0 commit comments

Comments
 (0)