diff --git a/post-process.ts b/post-process.ts index ecfe3fe..46c7eef 100644 --- a/post-process.ts +++ b/post-process.ts @@ -21,13 +21,25 @@ export const preProcess = async () => { await remove(join(".", "__sapper__", "export", baseUrl)); } + try { + const file = await readFile(join("..", ".upptimerc.yml"), "utf8"); + if (file) { + config = safeLoad(file) as any; + console.log("Using root config instead"); + } + } catch (error) { + console.log("Root config not found 1 dir up"); + } + try { const file = await readFile(join("..", "..", ".upptimerc.yml"), "utf8"); if (file) { config = safeLoad(file) as any; console.log("Using root config instead"); } - } catch (error) {} + } catch (error) { + console.log("Root config not found 2 dirs up"); + } if (config["status-website"] && config["status-website"].cname) await writeFile(join(".", "__sapper__", "export", "CNAME"), config["status-website"].cname);