Setup github project so that after any change to master branch doxygen documentation is generated and pushed to gh-pages by Travis CI
- Add clean
gh-pages
branch to your repository
git checkout --orphan gh-pages
git rm -rf .
echo "my gh-pages branch" > README.md
git add .
git commit -a -m "clean gh-pages branch"
git push origin gh-pages
- Add Doxyfile to
master
branch of your repository - Sign up for Travis CI and enable your project
- Generate personal access tokens with
public_repo
scope - Add this token in Travis CI ->
Your Project
->Settings
->Environment Variables
asGH_REPO_TOKEN
- Add
.travis.yml
tomaster
branch of your repository:
sudo: false
branches:
only:
- master
addons:
apt:
packages:
- doxygen
script:
- doxygen Doxyfile
deploy:
provider: pages
skip_cleanup: true
local_dir: docs/html
github_token: $GH_REPO_TOKEN
on:
branch: master
Troubleshoot if needed watching Travis CI output for your project.
Your documentation will be available at:
https://[your github user].github.io/[your github project]/
Working example / documentation
Very usefull and clear article!
Thank you!