diff --git a/bin/build-website.sh b/bin/build-website.sh new file mode 100755 index 000000000..0c4a33344 --- /dev/null +++ b/bin/build-website.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +echo "Building website..." +npm run build + +echo "Arranging built website in website/" +rm -rf website +mkdir website + +# rename demo/website-index.html to be the base index.html +cp dist/demo/website-index.html website/index.hml + +# selectively copy asset dirs from dist to the staging area +cp -R dist/demo website/demo +cp -R dist/css website/css +cp -R dist/global website/global + +CURRENT_SHA="$(git rev-parse HEAD)" +git add website/ +git commit -m "built website from $CURRENT_SHA" +echo "Done." diff --git a/bin/deploy-website.sh b/bin/deploy-website.sh new file mode 100755 index 000000000..7f6f35adb --- /dev/null +++ b/bin/deploy-website.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +git push origin `git subtree split --prefix website`:gh-pages --force diff --git a/demo/index.html b/demo/index.html index 398debdb5..1992c4058 100644 --- a/demo/index.html +++ b/demo/index.html @@ -2,7 +2,7 @@
-