mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2024-11-24 07:46:50 +01:00
Add netlify toml
This commit is contained in:
parent
1a8063f6fe
commit
5badfa804d
2 changed files with 16 additions and 0 deletions
9
netlify.toml
Normal file
9
netlify.toml
Normal file
|
@ -0,0 +1,9 @@
|
|||
[build]
|
||||
publish = "__sapper__/export"
|
||||
command = "node scripts/createEnv.js && yarn export"
|
||||
|
||||
[[redirects]]
|
||||
from = "/*"
|
||||
to = "/index.html"
|
||||
status = 200
|
||||
|
7
scripts/createEnv.js
Normal file
7
scripts/createEnv.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
const fs = require('fs');
|
||||
|
||||
let envString = '';
|
||||
envString += `GOOGLE_DRIVE_CLIENT_ID=${process.env.GOOGLE_DRIVE_CLIENT_ID}\n`;
|
||||
envString += `GOOGLE_DRIVE_API_KEY=${process.env.GOOGLE_DRIVE_API_KEY}\n`;
|
||||
|
||||
fs.writeFileSync('.env', envString);
|
Loading…
Reference in a new issue