From 7cd30b201ad4d876c5d81d1939265686c05c3b04 Mon Sep 17 00:00:00 2001 From: Alejandra Quetzalli Date: Thu, 26 May 2022 15:56:06 -0700 Subject: [PATCH 1/2] updating urls due to IA in website PR 601 --- .github/workflows/new-spec-release.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/new-spec-release.yml b/.github/workflows/new-spec-release.yml index 8eef2276e..eadf1fda3 100644 --- a/.github/workflows/new-spec-release.yml +++ b/.github/workflows/new-spec-release.yml @@ -38,20 +38,20 @@ jobs: script: | const fs = require("fs"); - const specFiles = fs.readdirSync("./website/pages/docs/specifications"); + const specFiles = fs.readdirSync("./website/pages/docs/reference/specification"); const nextRelease = `${{github.event.release.tag_name}}`; const prefixRelease = nextRelease.split("-")[0]; for (const filename of specFiles) { if (filename.startsWith(prefixRelease)) { - fs.unlinkSync(`./website/pages/docs/specifications/${filename}`); + fs.unlinkSync(`./website/pages/docs/reference/specification/${filename}`); } } - name: Copy Spec file from Current Repo to Another working-directory: ./website run: | - cp ../spec/spec/asyncapi.md ./pages/docs/specifications/${{github.event.release.tag_name}}.md + cp ../spec/spec/asyncapi.md ./pages/docs/reference/specification/${{github.event.release.tag_name}}.md - name: Remove Table of Contents from Spec uses: actions/github-script@v4 with: @@ -71,7 +71,7 @@ jobs: const endingLine = "# LATEST-SPEC-REDIRECTION:END"; const releaseVersion = `${{github.event.release.tag_name}}`; - const redirectLine = `/docs/specifications/latest /docs/specifications/${releaseVersion} 302!\n`; + const redirectLine = `/docs/reference/specification/latest /docs/reference/specification/${releaseVersion} 302!\n`; const redirectFile = fs.readFileSync("./website/public/_redirects", "utf-8"); @@ -139,7 +139,7 @@ jobs: const releaseVersionWithoutV = releaseVersion.slice(1); - const redirectLine = `/docs/specifications/${releaseVersionWithoutV} /docs/specifications/${releaseVersion} 302!\n`; + const redirectLine = `/docs/reference/specification/${releaseVersionWithoutV} /docs/reference/specification/${releaseVersion} 302!\n`; const redirectFile = fs.readFileSync("./website/public/_redirects", "utf-8"); From a105864885c3980f9c6b170fd1b9e23bebf78e79 Mon Sep 17 00:00:00 2001 From: Alejandra Quetzalli Date: Mon, 13 Jun 2022 16:05:46 -0700 Subject: [PATCH 2/2] added changes requested by macief --- .github/scripts/remove-toc.js | 4 ++-- .github/workflows/update-spec.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/scripts/remove-toc.js b/.github/scripts/remove-toc.js index b1305b21b..29adb5882 100644 --- a/.github/scripts/remove-toc.js +++ b/.github/scripts/remove-toc.js @@ -9,7 +9,7 @@ module.exports = (givenSpec) => { const startingLine = "## Table of Contents\n"; const endingLine = "\n"; - const specFile = fs.readFileSync(`./website/pages/docs/specifications/${givenSpec}.md`); + const specFile = fs.readFileSync(`./website/pages/docs/reference/specification/${givenSpec}.md`); const startingIndex = specFile.indexOf(startingLine); const endingIndex = specFile.indexOf(endingLine); @@ -21,5 +21,5 @@ module.exports = (givenSpec) => { const firstHalf = specFile.slice(0, startingIndex); const secondHalf = specFile.slice(endingIndex + endingLine.length); const specWithoutToc = `${firstHalf}${secondHalf}`; - fs.writeFileSync(`./website/pages/docs/specifications/${givenSpec}.md`, specWithoutToc); + fs.writeFileSync(`./website/pages/docs/reference/specification/${givenSpec}.md`, specWithoutToc); } diff --git a/.github/workflows/update-spec.yaml b/.github/workflows/update-spec.yaml index 0dfa85ed1..528a66e5c 100644 --- a/.github/workflows/update-spec.yaml +++ b/.github/workflows/update-spec.yaml @@ -41,7 +41,7 @@ jobs: - name: Copy Spec file from Current Repo to Another working-directory: ./website run: | - cp ../spec/spec/asyncapi.md ./pages/docs/specifications/${{ steps.latest_version.outputs.latest_tag }}.md + cp ../spec/spec/asyncapi.md ./pages/docs/reference/specification/${{ steps.latest_version.outputs.latest_tag }}.md - name: Remove Table of Contents from Spec uses: actions/github-script@v4 with: