forked from Tokyo-Metro-Gov/covid19
-
Notifications
You must be signed in to change notification settings - Fork 9
/
netlify.toml
27 lines (22 loc) · 1007 Bytes
/
netlify.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[build]
functions = "functions"
[[redirects]]
force = true
from = "/api/rss/paper"
headers = {X-From = "Netlify"}
status = 200
to = "/.netlify/functions/paper/"
[[redirects]]
from = "/*"
to = "/404.html"
status = 404
#[context.production]
# https://stackoverflow.com/questions/3856747/check-whether-a-certain-file-type-extension-exists-in-directory
# data ディレクトリの中に json ファイルが
# 無ければ json ファイルを生成。
# 既に存在すれば何もしない。
# command = "if [ $(ls -1 data/*.json 2>/dev/null | wc -l) == 0 ]; then pushd covid19_fukui && yarn fetch && popd; fi && yarn generate:deploy"
#[context.branch-deploy]
# command = "if [ $(ls -1 data/*.json 2>/dev/null | wc -l) == 0 ]; then pushd covid19_fukui && yarn fetch && popd; fi && yarn generate:dev"
#[context.deploy-preview]
# command = "if [ $(ls -1 data/*.json 2>/dev/null | wc -l) == 0 ]; then pushd covid19_fukui && yarn fetch && popd; fi && yarn generate:deploy"