ci: separate website deploy

This commit is contained in:
iCrawl
2023-11-08 10:38:44 +01:00
parent da455bceea
commit 413d6d67c5
5 changed files with 73 additions and 10 deletions

View File

@@ -25,12 +25,11 @@ export async function fetchVersions(packageName: string): Promise<string[]> {
export async function fetchModelJSON(packageName: string, version: string): Promise<unknown | null> {
if (process.env.NEXT_PUBLIC_LOCAL_DEV) {
const res = await readFile(
join(process.cwd(), '..', '..', 'packages', packageName, 'docs', 'docs.api.json'),
'utf8',
);
let res;
try {
res = await readFile(join(process.cwd(), '..', '..', 'packages', packageName, 'docs', 'docs.api.json'), 'utf8');
return JSON.parse(res);
} catch {
console.log(res);