Skip to content

Commit

Permalink
Feat: use env variable in fetch result
Browse files Browse the repository at this point in the history
  • Loading branch information
mirumodapon committed Jul 14, 2023
1 parent 517c6d0 commit cb69999
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
VITE_HCAPTCHA_SITE_KEY=
VITE_BACKEND_URL=
GOOGLE_SERVICE_ACCOUNT_EMAIL=
GOOGLE_PRIVATE_KEY=
GOOGLE_PRIVATE_KEY=
RESULT_SPREADSHEET_ID=
1 change: 1 addition & 0 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
VITE_BACKEND_URL: ${{secrets.VITE_BACKEND_URL}}
GOOGLE_SERVICE_ACCOUNT_EMAIL: ${{secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL}}
GOOGLE_PRIVATE_KEY: ${{secrets.GOOGLE_PRIVATE_KEY}}
RESULT_SPREADSHEET_ID: ${{secrets.RESULT_SPREADSHEET_ID}}

strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion scripts/fetchResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { writeFile } from 'fs/promises'
import palette from 'google-palette'

config({ path: join(__dirname, '../.env.local') })
const SPREADSHEET_ID = '1AYf_qzrxlp7K2SdsgUfjpqIY7qiPOG710zsMpyhpCCo'
const SPREADSHEET_ID = process.env.RESULT_SPREADSHEET_ID;

async function getSource() {
const doc = new GoogleSpreadsheet(SPREADSHEET_ID)
Expand Down

0 comments on commit cb69999

Please sign in to comment.