Automatic documentation update with ex_doc and Github pages for Elixir
After setting up your gh-pages branch according to a short howto from chrisjacob just add this little post-commit hook and everytime you commit something now the documentation of your elixir project is being generated by ex_doc from your current master branch.
First put this into a file called post-commit
in <your_project>/.git/hooks
#!/bin/bash
git checkout master
mix docs
cd docs/
git checkout gh-pages
git add .
git commit -m "update documentation"
git push origin gh-pages
After that make sure it's executable by using
chmod +x <your_project>/.git/hooks/post-commit
and now you're ready to go.
Written by Udo
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Elixir
Authors
Related Tags
#elixir
#documentation
#hook
#gh-pages
#post-commit
#update
#git
#pages
#generate
#ex_doc
#github
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#