From 222dd7aa64679228774a029b9712c699810ba2cd Mon Sep 17 00:00:00 2001 From: Ben Rockwood Date: Mon, 4 Mar 2024 17:33:23 -0800 Subject: [PATCH 1/5] HS Account ID needs to be in quotes Signed-off-by: Ben Rockwood --- docusaurus.config.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index ec0f0dc8f..9d6aa3435 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,6 +1,6 @@ // @type {import('@docusaurus/types').DocusaurusConfig}; -const { themes } = require("prism-react-renderer"); +const { themes } = require("prism-react-renderer") const legacyRedirects = [ // NOTE: Path / is equivalent to https://mondoo.com/docs/ @@ -45,7 +45,7 @@ const legacyRedirects = [ from: "/references/cli/mondoo", to: "/cnspec/cli/cnspec_scan", }, -]; +] module.exports = { title: "Mondoo Docs", @@ -71,27 +71,27 @@ module.exports = { if (existingPath.includes("/platform/infra/cloud")) { return [ existingPath.replace("/platform/infra/cloud", "/platform/cloud"), - ]; + ] } else if (existingPath.includes("/platform/infra/opsys")) { return [ existingPath.replace( "/platform/infra/opsys", - "/platform/operating_systems", + "/platform/operating_systems" ), - ]; + ] } else if (existingPath.includes("/platform/infra/saas")) { return [ existingPath.replace("/platform/infra/saas", "/platform/saas"), - ]; + ] } else if (existingPath.includes("/platform/infra/supply")) { return [ existingPath.replace( "/platform/infra/supply", - "/platform/supplychain", + "/platform/supplychain" ), - ]; + ] } - return undefined; // Return a falsy value: no redirect created + return undefined // Return a falsy value: no redirect created }, }, ], @@ -104,7 +104,7 @@ module.exports = { ], themeConfig: { hubspot: { - accountId: HS_ACCOUNTID, + accountId: "HS_ACCOUNTID", }, docs: { sidebar: { @@ -296,4 +296,4 @@ module.exports = { }, ], ], -}; +} From 237ba9a3ac1ffd2cffcd594792fdc867b328f5a0 Mon Sep 17 00:00:00 2001 From: Ben Rockwood Date: Mon, 4 Mar 2024 18:09:37 -0800 Subject: [PATCH 2/5] Fix case of outputs Signed-off-by: Ben Rockwood --- .github/actions/PREview-data/action.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/PREview-data/action.yaml b/.github/actions/PREview-data/action.yaml index 6d7976408..021f2c600 100644 --- a/.github/actions/PREview-data/action.yaml +++ b/.github/actions/PREview-data/action.yaml @@ -5,13 +5,13 @@ description: "Caluculate branch, bucket, and PREview URL." outputs: url: description: "PREview URL" - value: ${{ steps.data.outputs.url }} + value: ${{ steps.data.outputs.URL }} branch: description: "Branch Name" - value: ${{ steps.data.outputs.branch }} + value: ${{ steps.data.outputs.BRANCH }} bucket: description: "Bucket for PREview" - value: ${{ steps.data.outputs.bucket }} + value: ${{ steps.data.outputs.BUCKET }} runs: using: "composite" From e99881de72bc8cf61e5582fec57739533f8609ea Mon Sep 17 00:00:00 2001 From: Ben Rockwood Date: Mon, 4 Mar 2024 18:11:46 -0800 Subject: [PATCH 3/5] Consistent casing Signed-off-by: Ben Rockwood --- .github/actions/PREview-data/action.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/PREview-data/action.yaml b/.github/actions/PREview-data/action.yaml index 021f2c600..5d990c5f2 100644 --- a/.github/actions/PREview-data/action.yaml +++ b/.github/actions/PREview-data/action.yaml @@ -3,13 +3,13 @@ name: "PREview: Data" description: "Caluculate branch, bucket, and PREview URL." outputs: - url: + URL: description: "PREview URL" value: ${{ steps.data.outputs.URL }} - branch: + BRANCH: description: "Branch Name" value: ${{ steps.data.outputs.BRANCH }} - bucket: + BUCKET: description: "Bucket for PREview" value: ${{ steps.data.outputs.BUCKET }} From de136f715c918d211f7bcdc099e946cad93abfd7 Mon Sep 17 00:00:00 2001 From: Ben Rockwood Date: Mon, 4 Mar 2024 18:20:48 -0800 Subject: [PATCH 4/5] Fix step name Signed-off-by: Ben Rockwood --- .github/actions/PREview-data/action.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/PREview-data/action.yaml b/.github/actions/PREview-data/action.yaml index 5d990c5f2..36f381716 100644 --- a/.github/actions/PREview-data/action.yaml +++ b/.github/actions/PREview-data/action.yaml @@ -18,7 +18,7 @@ runs: steps: - name: Determine branch shortname and bucket name shell: bash - id: names + id: data run: | BRANCH=`echo ${GITHUB_HEAD_REF} | cksum | cut -d" " -f1` # Use checksum of branch name to avoid invalid bucket names echo BRANCH=${BRANCH} >> $GITHUB_OUTPUT @@ -35,4 +35,4 @@ runs: - name: Verify outputs shell: bash id: out - run: echo ${{ steps.names.outputs.BUCKET }} + run: echo ${{ steps.data.outputs.BUCKET }} From 33e1307a6ed7866cd22243627faab3c35dd4b3a5 Mon Sep 17 00:00:00 2001 From: Ben Rockwood Date: Mon, 4 Mar 2024 18:32:00 -0800 Subject: [PATCH 5/5] Revert docusaurus from this PR Signed-off-by: Ben Rockwood --- docusaurus.config.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docusaurus.config.js b/docusaurus.config.js index 9d6aa3435..ec0f0dc8f 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -1,6 +1,6 @@ // @type {import('@docusaurus/types').DocusaurusConfig}; -const { themes } = require("prism-react-renderer") +const { themes } = require("prism-react-renderer"); const legacyRedirects = [ // NOTE: Path / is equivalent to https://mondoo.com/docs/ @@ -45,7 +45,7 @@ const legacyRedirects = [ from: "/references/cli/mondoo", to: "/cnspec/cli/cnspec_scan", }, -] +]; module.exports = { title: "Mondoo Docs", @@ -71,27 +71,27 @@ module.exports = { if (existingPath.includes("/platform/infra/cloud")) { return [ existingPath.replace("/platform/infra/cloud", "/platform/cloud"), - ] + ]; } else if (existingPath.includes("/platform/infra/opsys")) { return [ existingPath.replace( "/platform/infra/opsys", - "/platform/operating_systems" + "/platform/operating_systems", ), - ] + ]; } else if (existingPath.includes("/platform/infra/saas")) { return [ existingPath.replace("/platform/infra/saas", "/platform/saas"), - ] + ]; } else if (existingPath.includes("/platform/infra/supply")) { return [ existingPath.replace( "/platform/infra/supply", - "/platform/supplychain" + "/platform/supplychain", ), - ] + ]; } - return undefined // Return a falsy value: no redirect created + return undefined; // Return a falsy value: no redirect created }, }, ], @@ -104,7 +104,7 @@ module.exports = { ], themeConfig: { hubspot: { - accountId: "HS_ACCOUNTID", + accountId: HS_ACCOUNTID, }, docs: { sidebar: { @@ -296,4 +296,4 @@ module.exports = { }, ], ], -} +};