Skip to content

Commit 38b8c8a

Browse files
authored
ci: fix path for docs update (#1138)
Co-authored-by: Varshitha Besthavemula <varshithabesthavemula@gmail.com>
1 parent 0352e59 commit 38b8c8a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/scripts/remove-toc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = (givenSpec) => {
99
const startingLine = "## Table of Contents\n";
1010
const endingLine = "<!-- /TOC -->\n";
1111

12-
const specFile = fs.readFileSync(`./website/pages/docs/reference/specification/${givenSpec}.md`);
12+
const specFile = fs.readFileSync(`./website/markdown/docs/reference/specification/${givenSpec}.md`);
1313

1414
const startingIndex = specFile.indexOf(startingLine);
1515
const endingIndex = specFile.indexOf(endingLine);
@@ -21,5 +21,5 @@ module.exports = (givenSpec) => {
2121
const firstHalf = specFile.slice(0, startingIndex);
2222
const secondHalf = specFile.slice(endingIndex + endingLine.length);
2323
const specWithoutToc = `${firstHalf}${secondHalf}`;
24-
fs.writeFileSync(`./website/pages/docs/reference/specification/${givenSpec}.md`, specWithoutToc);
24+
fs.writeFileSync(`./website/markdown/docs/reference/specification/${givenSpec}.md`, specWithoutToc);
2525
}

.github/workflows/new-spec-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,20 @@ jobs:
3838
script: |
3939
const fs = require("fs");
4040
41-
const specFiles = fs.readdirSync("./website/pages/docs/reference/specification");
41+
const specFiles = fs.readdirSync("./website/markdown/docs/reference/specification");
4242
4343
const nextRelease = `${{github.event.release.tag_name}}`;
4444
const prefixRelease = nextRelease.split("-")[0];
4545
4646
for (const filename of specFiles) {
4747
if (filename.startsWith(prefixRelease)) {
48-
fs.unlinkSync(`./website/pages/docs/reference/specification/${filename}`);
48+
fs.unlinkSync(`./website/markdown/docs/reference/specification/${filename}`);
4949
}
5050
}
5151
- name: Copy Spec file from Current Repo to Another
5252
working-directory: ./website
5353
run: |
54-
cp ../spec/spec/asyncapi.md ./pages/docs/reference/specification/${{github.event.release.tag_name}}.md
54+
cp ../spec/spec/asyncapi.md ./markdown/docs/reference/specification/${{github.event.release.tag_name}}.md
5555
- name: Remove Table of Contents from Spec
5656
uses: actions/github-script@v6
5757
with:

0 commit comments

Comments
 (0)