You know, precise and correct documentation is the one kept in synch with the source code automatically.
There are many ways of doing that, many kinds of documentation. Here I’ll show you how to publish content in GitHub Pages after a successful build. In this case, the content is a API specification generated when running acceptance tests.
How to do it?
- Put the content you want to be published in the /docs dir
- Go to Settings, find the GitHub Pages section, and select Source to master branch /docs folder, then press Save
- Push it to master.
The content in the /docs will be available at
The Past – In Case You Are Curious
(It’s nice to see that things are getting simpler.)
Not so long ago, I wrote a post (Tip #1) explaining how to achieve the same result using Travis CI and some scripting help. This little project is configured the old way: see travis.yml and update-gh-pages.sh files.
You can find more information at GitHub help pages: