diff --git a/docs/index.md b/docs/index.md index 712f95a3..54735204 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,9 +2,9 @@ This is the documentation home for Rojo. Available versions of these docs: +* [Latest version (currently 0.5.x)](https://lpghatguy.github.io/rojo) * [0.5.x](https://lpghatguy.github.io/rojo/0.5.x) * [0.4.x](https://lpghatguy.github.io/rojo/0.4.x) -* [`master` branch](https://lpghatguy.github.io/rojo/master) **Rojo** is a flexible multi-tool designed for creating robust Roblox projects. diff --git a/generate-docs b/generate-docs index fc64fb30..22991a29 100644 --- a/generate-docs +++ b/generate-docs @@ -10,12 +10,22 @@ REMOTE=$(git remote get-url origin) CHECKOUT="$(mktemp -d)" OUTPUT="$(pwd)/site" +if [ -d site ] +then + cd site + git pull +else + git clone "$REMOTE" site + cd site + git checkout gh-pages +fi + git clone "$REMOTE" "$CHECKOUT" cd "$CHECKOUT" echo "Building master" git checkout master -mkdocs build --site-dir "$OUTPUT/master" +mkdocs build --site-dir "$OUTPUT" echo "Building 0.5.x" mkdocs build --site-dir "$OUTPUT/0.5.x"