Skip to content

Instantly share code, notes, and snippets.

@rodrigocfd
Last active January 22, 2021 19:04
Show Gist options
  • Select an option

  • Save rodrigocfd/3a0f3370817ec5c8c3d2ec6e516ae86b to your computer and use it in GitHub Desktop.

Select an option

Save rodrigocfd/3a0f3370817ec5c8c3d2ec6e516ae86b to your computer and use it in GitHub Desktop.
Deploy WinSafe docs to gh-pages branch
# Generates the doc and deploys it to gh-pages branch,
# which must be in the $GHP directory.
# https://gist.github.com/rodrigocfd/3a0f3370817ec5c8c3d2ec6e516ae86b
GHP=../gh-pages-winsafe # target gh-pages repo folder
cargo doc # generate locally
cd $GHP
git rm -r . # remove previous html files
cd -
mv ./target/doc/* $GHP/. # move all generated html
cd -
git add .
dtt=$(date '+%Y-%m-%d %H:%M:%S')
git commit -m "Cargo doc deployment $dtt."
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment