mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
ci: separate website deploy
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user