Skip to content

Instantly share code, notes, and snippets.

@dginev
Created December 19, 2017 01:50
Show Gist options
  • Save dginev/9eba1da258d9caf902dfc770cb28f03c to your computer and use it in GitHub Desktop.
Save dginev/9eba1da258d9caf902dfc770cb28f03c to your computer and use it in GitHub Desktop.
Simple bash script for quickly uploading the "cargo doc" documentation to gh-pages
#!/bin/bash
export TMPGITURL=$(git remote -v |grep origin|grep push|awk '{print $2}')
cargo doc
rm -rf generated-doc
mv target/doc generated-doc
cd generated-doc
git init
git add .
git commit -m 'Deployed to Github Pages'
git push --force $TMPGITURL master:gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment