-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
移植下載Sponsor圖片 #13
移植下載Sponsor圖片 #13
Conversation
Spyup
commented
Apr 3, 2024
- Close 重構抓取 sheet 資料的 script #7
更動:
作用:手動驅動 Workflow 下載 Sponsor 圖片 待研究:自動更新 |
.github/workflows/SponsorImg.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
感覺這個要寫進 Deploy.yml?
scripts/tools/downloadSponsorImg.ts
Outdated
import { google, sheets_v4 } from 'googleapis' | ||
import { mkdir, writeFile } from 'fs/promises' | ||
import * as path from 'path' | ||
import get from 'lodash/get' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這個依賴好像是錯的
現在專案裡的 lodash 是 lodash_es
const sheets = google.sheets('v4') | ||
try { | ||
const sheetsData = await sheets.spreadsheets.get({ | ||
key: process.env.SPREADSHEET_API_KEY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這裡的 key 沒有導入,所以會吃不到 key
@@ -54,7 +56,6 @@ | |||
"devDependencies": { | |||
"@faker-js/faker": "^7.6.0", | |||
"@iconify/json": "^2.2.52", | |||
"@types/google-spreadsheet": "^3.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
這個為什麼要刪掉呀