Move to Netlify (#1683)

* Remove GitHub Pages publish script

* Redirect katex.netlify.com to katex.org

* Redirect function-support using _redirects

* Redirect docs to the first documentation and docs/en/ to docs/

* Include HSTS includeSubDomains and preload directive

* Cache static image assets
This commit is contained in:
ylemkimon
2018-09-02 20:06:39 +09:00
committed by GitHub
parent 9a6f31abcc
commit 761c52f99b
5 changed files with 11 additions and 28 deletions

View File

@@ -209,23 +209,6 @@ else
# Fallback to npm publish, if yarn cannot authenticate, e.g., 2FA
yarn publish --new-version "$VERSION" || npm publish
# Publish the website
# If gh-pages branch is protected, push to another branch
pushd website
PUBLISH_GH_PAGES=$(USE_SSH=true yarn publish-gh-pages 2>&1 | tee /dev/tty || true)
if echo "$PUBLISH_GH_PAGES" | grep -qEi 'GH006|protected branch'; then
pushd build/KaTeX-gh-pages
git checkout -B "v$VERSION-gh-pages"
git push -u origin "v$VERSION-gh-pages"
popd
echo ""
echo "GitHub pages branch is protected."
echo "Create a pull request against gh-pages from 'v$VERSION-gh-pages'"
echo "Visit https://github.com/Khan/KaTeX/pulls to open a pull request."
fi
popd
echo ""
echo "The automatic parts are done!"
echo "Now all that's left is to create the release on GitHub."