Skip to content

Commit

Permalink
Merge pull request #1274 from future-architect/feature
Browse files Browse the repository at this point in the history
Comment out news.js script
  • Loading branch information
ma91n authored May 29, 2024
2 parents 4851d64 + dfd682f commit 81d0f88
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions scripts/news.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();

Expand Down

0 comments on commit 81d0f88

Please sign in to comment.