#!/bin/bash GITHUB=mini-fs DOCS_DIR=.pages/ cargo doc --all-features rm -rf $DOCS_DIR mv target/doc $DOCS_DIR cat << EOF > $DOCS_DIR/index.html You are being redirected to the documentation page... EOF git -C $DOCS_DIR init && \ git -C $DOCS_DIR remote add origin https://germangb:$TOKEN@github.com/germangb/$GITHUB.git && \ git -C $DOCS_DIR checkout -b gh-pages && \ git -C $DOCS_DIR add -A && \ git -C $DOCS_DIR commit -m "Publish docs" > /dev/null && \ git -C $DOCS_DIR push origin gh-pages --force --quiet