From dfd682f236a8f6de932937d966e111606e0d6cc7 Mon Sep 17 00:00:00 2001 From: ma91n Date: Wed, 29 May 2024 20:56:55 +0900 Subject: [PATCH] Comment out news.js script --- .github/workflows/deploy.yml | 24 ++++++++++++------------ scripts/news.js | 18 +++++++++--------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0c0801ac5374..a29dd0b5f036 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -62,19 +62,19 @@ jobs: - name: Install dependencies run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} - - name: Install Go tools - run: | - mkdir ~/bin - export GOBIN=~/bin - go install github.com/ma91n/snssharecount/cmd/snssharecount@latest - go install github.com/ma91n/snssharecount/cmd/ga@latest + # - name: Install Go tools + # run: | + # mkdir ~/bin + # export GOBIN=~/bin + # go install github.com/ma91n/snssharecount/cmd/snssharecount@latest + # go install github.com/ma91n/snssharecount/cmd/ga@latest - - name: Update SNS counts - run: | - echo '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}' > google_application_credentials.json - ~/bin/snssharecount > temp.json - mv temp.json sns_count_cache.json - ~/bin/ga > ga_cache.json + # - name: Update SNS counts + # run: | + # echo '${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}' > google_application_credentials.json + # ~/bin/snssharecount > temp.json + # mv temp.json sns_count_cache.json + # ~/bin/ga > ga_cache.json - name: Build with hexo run: ${{ steps.detect-package-manager.outputs.runner }} hexo generate diff --git a/scripts/news.js b/scripts/news.js index 5957d4903877..d414aa9318e8 100644 --- a/scripts/news.js +++ b/scripts/news.js @@ -14,15 +14,15 @@ process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0; (async () => { - let proxyAgent; - if (process.env.http_proxy) { - proxyAgent = new HttpsProxyAgent.HttpsProxyAgent(process.env.http_proxy); - } + let proxyAgent; + if (process.env.http_proxy) { + proxyAgent = new HttpsProxyAgent.HttpsProxyAgent(process.env.http_proxy); + } - const qiitaRssResponse = await fetch( - "https://qiita.com/organizations/future/activities.atom", - { agent: proxyAgent } - ); + const qiitaRssResponse = await fetch( + "https://qiita.com/organizations/future/activities.atom", + { agent: proxyAgent, timeout: 30000 } + ); const qiitaRssResponseText = await qiitaRssResponse.text(); const rssParser = new RssParser(); @@ -37,7 +37,7 @@ process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0; const connpassRssResponse = await fetch( "https://future.connpass.com/ja.atom", - { agent: proxyAgent } + { agent: proxyAgent, timeout: 30000 } ); const connpassRssResponseText = await connpassRssResponse.text();