From 538dceefd654dfa825d9a8eca803fe1c5f7e931b Mon Sep 17 00:00:00 2001 From: Ailing Date: Sat, 11 Sep 2021 00:45:03 -0700 Subject: [PATCH] Enable deploy preview if changes are detected in docs. (#2913) --- netlify.toml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000000000..461c6e304a23b --- /dev/null +++ b/netlify.toml @@ -0,0 +1,8 @@ +[build] + command = "git clone https://github.com/taichi-dev/docs.taichi.graphics.git; rm -rf docs.taichi.graphics/website/docs/lang; cp -rf docs/lang docs.taichi.graphics/website/docs/lang; cd docs.taichi.graphics/website; npm install --global yarn@1.22; yarn install; yarn build" + + publish = "docs.taichi.graphics/website/build" + + # Cancel the build if there're no changes detected in docs/ folder. + ignore = "git remote add upstream https://github.com/taichi-dev/taichi.git; git fetch upstream master; git diff --quiet $COMMIT_REF upstream/master -- docs/" +