From 014f3e1da022900ac7c4b5db8586020ee686073d Mon Sep 17 00:00:00 2001
From: Fabien Lavocat <4154532+FabienLavocat@users.noreply.github.com>
Date: Wed, 22 Jul 2026 11:06:44 -0700
Subject: [PATCH 1/3] Update deploy workflow
Signed-off-by: Fabien Lavocat <4154532+FabienLavocat@users.noreply.github.com>
---
.github/workflows/_build.yml | 1 +
docusaurus.config.ts | 14 ++++++++------
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml
index 12e3f9030383..077ba4875654 100644
--- a/.github/workflows/_build.yml
+++ b/.github/workflows/_build.yml
@@ -21,6 +21,7 @@ on:
docusaurus_pr_number:
required: false
type: number
+ default: -1
docusaurus_pr_url:
required: false
type: string
diff --git a/docusaurus.config.ts b/docusaurus.config.ts
index 826976780f97..237529e5a509 100644
--- a/docusaurus.config.ts
+++ b/docusaurus.config.ts
@@ -83,10 +83,10 @@ const docsConfigBase = {
} satisfies DocsPlugin.Options;
// Remove the index.md[x] from categories
-function removeDocIndexItems(items) {
+function removeDocIndexItems(items: any) {
const result = items
- .filter((item) => item.type !== 'doc' || !item.id.endsWith('/index'))
- .map((item) => {
+ .filter((item: any) => item.type !== 'doc' || !item.id.endsWith('/index'))
+ .map((item: any) => {
if (item.type === 'category') {
return { ...item, items: removeDocIndexItems(item.items) };
}
@@ -96,6 +96,8 @@ function removeDocIndexItems(items) {
return result;
}
+const PR_NUMBER = Number(process.env.DOCUSAURUS_PR_NUMBER ?? -1);
+
const config: Config = {
title: 'Dolby OptiView Documentation',
tagline: 'Discover the latest developer documentation and samples for OptiView products',
@@ -453,7 +455,7 @@ const config: Config = {
parseFrontMatter: async (params) => {
const result = await params.defaultParseFrontMatter(params);
const { frontMatter } = result;
- const parsedDocPath = parseDocPath(params.filePath);
+ const parsedDocPath = parseDocPath(params.filePath)!;
const { docPluginId } = parsedDocPath;
let { docPath } = parsedDocPath;
if (!frontMatter.slug && docPath.startsWith('external/')) {
@@ -535,7 +537,7 @@ const config: Config = {
// image: 'img/opengraph.png',
// announcement bar for PR preview only
- announcementBar: process.env.DOCUSAURUS_PR_NUMBER
+ announcementBar: PR_NUMBER > 0
? {
id: 'pr_preview',
content: `This is a preview of the documentation website from pull request #${process.env.DOCUSAURUS_PR_NUMBER}.`,
@@ -546,7 +548,7 @@ const config: Config = {
: undefined,
navbar: {
- title: null,
+ title: undefined,
logo: {
alt: 'Dolby OptiView',
src: 'img/dolby-optiview-white.svg',
From 8550edb4756c2ed966f57fc18561076665174396 Mon Sep 17 00:00:00 2001
From: Fabien Lavocat <4154532+FabienLavocat@users.noreply.github.com>
Date: Wed, 22 Jul 2026 11:12:05 -0700
Subject: [PATCH 2/3] lint
Signed-off-by: Fabien Lavocat <4154532+FabienLavocat@users.noreply.github.com>
---
docusaurus.config.ts | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/docusaurus.config.ts b/docusaurus.config.ts
index 237529e5a509..f8b709647e47 100644
--- a/docusaurus.config.ts
+++ b/docusaurus.config.ts
@@ -537,15 +537,16 @@ const config: Config = {
// image: 'img/opengraph.png',
// announcement bar for PR preview only
- announcementBar: PR_NUMBER > 0
- ? {
- id: 'pr_preview',
- content: `This is a preview of the documentation website from pull request #${process.env.DOCUSAURUS_PR_NUMBER}.`,
- backgroundColor: '#9cb9c9',
- textColor: '#344a5e',
- isCloseable: false,
- }
- : undefined,
+ announcementBar:
+ PR_NUMBER > 0
+ ? {
+ id: 'pr_preview',
+ content: `This is a preview of the documentation website from pull request #${process.env.DOCUSAURUS_PR_NUMBER}.`,
+ backgroundColor: '#9cb9c9',
+ textColor: '#344a5e',
+ isCloseable: false,
+ }
+ : undefined,
navbar: {
title: undefined,
From 0c63392619a1caaad724029caf7078e8b3e411c8 Mon Sep 17 00:00:00 2001
From: Fabien Lavocat <4154532+FabienLavocat@users.noreply.github.com>
Date: Wed, 22 Jul 2026 11:25:37 -0700
Subject: [PATCH 3/3] Update the Cloudfront invalidate path
Signed-off-by: Fabien Lavocat <4154532+FabienLavocat@users.noreply.github.com>
---
.github/workflows/_deploy.yml | 6 +++++-
.github/workflows/_undeploy.yml | 6 +++++-
.github/workflows/main.yml | 1 +
.github/workflows/pull-request.yml | 2 ++
4 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/_deploy.yml b/.github/workflows/_deploy.yml
index a77eda0f46c3..4f022dc22909 100644
--- a/.github/workflows/_deploy.yml
+++ b/.github/workflows/_deploy.yml
@@ -21,6 +21,10 @@ on:
description: AWS S3 prefix where to store the build.
required: true
type: string
+ cf_invalidate_path:
+ description: Path to invalidate on CloudFront after deployment.
+ required: true
+ type: string
concurrency: deploy-${{ github.ref }}
@@ -64,4 +68,4 @@ jobs:
--paths ${PATH_TO_INVALIDATE}
env:
CF_DISTRIBUTION_ID: ${{ vars.CF_DISTRIBUTION_ID }}
- PATH_TO_INVALIDATE: '/${{ inputs.s3_prefix }}*'
+ PATH_TO_INVALIDATE: ${{ inputs.cf_invalidate_path }}
diff --git a/.github/workflows/_undeploy.yml b/.github/workflows/_undeploy.yml
index a2c5f35e2cad..23872655faa5 100644
--- a/.github/workflows/_undeploy.yml
+++ b/.github/workflows/_undeploy.yml
@@ -10,6 +10,10 @@ on:
description: AWS S3 prefix where the build is located.
required: true
type: string
+ cf_invalidate_path:
+ description: Path to invalidate on CloudFront after deployment.
+ required: true
+ type: string
concurrency: deploy-${{ github.ref }}
@@ -45,4 +49,4 @@ jobs:
--paths ${PATH_TO_INVALIDATE}
env:
CF_DISTRIBUTION_ID: ${{ vars.CF_DISTRIBUTION_ID }}
- PATH_TO_INVALIDATE: '/${{ inputs.s3_prefix }}*'
+ PATH_TO_INVALIDATE: ${{ inputs.cf_invalidate_path }}
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 363bca042dfb..6b54b3081fc4 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -27,3 +27,4 @@ jobs:
environment_name: production
artifact_name: ${{ needs.build.outputs.artifact_name }}
s3_prefix: 'docs'
+ cf_invalidate_path: '/*'
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index 7a9b84e15ea4..4c5d47dbbd2e 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -41,6 +41,7 @@ jobs:
environment_url: '${{ vars.PREVIEW_CLOUDFRONT_URL }}/pr-${{ github.event.number }}/'
artifact_name: ${{ needs.build.outputs.artifact_name }}
s3_prefix: 'pr-${{ github.event.number }}'
+ cf_invalidate_path: '/pr-${{ github.event.number }}*'
undeploy:
name: undeploy
@@ -49,3 +50,4 @@ jobs:
with:
environment_name: preview
s3_prefix: 'pr-${{ github.event.number }}'
+ cf_invalidate_path: '/pr-${{ github.event.number }}*'