diff --git a/.github/workflows/failsafe.yml b/.github/workflows/failsafe.yml index e8e63b7..bc64656 100644 --- a/.github/workflows/failsafe.yml +++ b/.github/workflows/failsafe.yml @@ -5,8 +5,8 @@ on: pull_request: branches: [main] schedule: - # 18:00 GMT+8 every Monday - - cron: '0 10 * * 1' + # 18:00 GMT+8 every day + - cron: '0 10 * * *' env: AWS_REGION: ${{ secrets.AWS_REGION }} diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 8953a7e..b464ddc 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -5,8 +5,8 @@ on: pull_request: branches: [main] schedule: - # 18:30 GMT+8 every Monday and Thursday - - cron: '30 10 * * 1,4' + # 18:30 GMT+8 every day + - cron: '30 10 * * *' jobs: wait-for-deployment: diff --git a/site.config.js b/site.config.js index 392b9f5..3da9099 100644 --- a/site.config.js +++ b/site.config.js @@ -34,8 +34,8 @@ module.exports = { ttls: { // seconds default: 30, - sitemap: 86400 * 7, - notionPage: 86400 * 7, + sitemap: 86400, + notionPage: 86400, previewImage: 86400 * 30, }, url: env.get('CACHE_CLIENT_API_URL').asString(), @@ -190,8 +190,8 @@ module.exports = { userName: 'dazedbear', }, youtube: { - channelBaseUrl: 'https://www.youtube.com/channel', - channelHash: 'UCvyYCMFjUbcHtZhnC-VGwHw', + channelBaseUrl: 'https://www.youtube.com', + channelHash: '@dazedbearstudio', }, }, communityFeatures: { @@ -206,11 +206,11 @@ module.exports = { }, { name: 'musicLogbook', - enable: true, + enable: false, }, { name: 'openprocessing', - enable: true, + enable: false, }, { name: 'soundcloud', diff --git a/src/libs/server/page.ts b/src/libs/server/page.ts index 4477712..8260401 100644 --- a/src/libs/server/page.ts +++ b/src/libs/server/page.ts @@ -149,7 +149,7 @@ export const fetchArticleStream = async ({ req, } log(options) - throw 'Required info are invalid in fetchArticleStream.' + throw Error('Required info are invalid in fetchArticleStream.') } const response = await getNotionPage(id) @@ -198,7 +198,7 @@ export const fetchSinglePage = async ({ req, } log(options) - throw 'Required info are invalid in fetchSinglePage.' + throw Error('Required info are invalid in fetchSinglePage.') } const response = await getNotionPage(id) diff --git a/src/libs/server/transformer.ts b/src/libs/server/transformer.ts index 71e2fbe..b2f9890 100644 --- a/src/libs/server/transformer.ts +++ b/src/libs/server/transformer.ts @@ -98,7 +98,7 @@ export const transformArticleStream = async ( level: 'warn', } log(options) - throw 'articleStream is invalid' + throw Error('articleStream is invalid') } return articleStream @@ -191,7 +191,7 @@ export const transformSingleArticle = async ( level: 'warn', } log(options) - throw 'singleArticle is invalid' + throw Error('singleArticle is invalid') } return singleArticle @@ -231,7 +231,7 @@ export const transformSinglePage = async ( level: 'warn', } log(options) - throw 'single page is invalid' + throw Error('single page is invalid') } return pageContent @@ -296,7 +296,7 @@ export const transformMenuItems = ( level: 'warn', } log(options) - throw 'menuItems are invalid' + throw Error('menuItems are invalid') } return menuItems @@ -344,7 +344,7 @@ export const transformArticleSinglePageMeta = ( level: 'warn', } log(options) - throw 'page meta are invalid' + throw Error('page meta are invalid') } return pageMeta @@ -397,7 +397,7 @@ export const transformPageUrls = ( level: 'warn', } log(options) - throw 'page urls are invalid' + throw Error('page urls are invalid') } return pageUrls @@ -414,7 +414,7 @@ export const transformStreamActionPayload = ( articleStream: ArticleStream ): StreamActionPayloadState => { return { - name: pageName as string, + name: pageName, data: { content: cloneDeep(articleStream.content), hasNext: articleStream.hasNext, @@ -436,7 +436,7 @@ export const transformPageActionPayload = ( pageContent: SinglePage ): StreamActionPayloadState => { return { - name: pageName as string, + name: pageName, data: cloneDeep(pageContent), } }