Closed robinvy closed 4 years ago
If all Travis script actions succeed the deploy directive added to .travis.yml to pages is executed and push the documentation to the GitHub Pages available at: https://ansible-aix.github.io/ansible-power-aix/
More details: Prereq: the documentation is generated by gen_doc.sh into ./documentation during the Travis build. Activated Pages in the Settings->Options (using a separated branch gh-pages). It uses a token to authenticate. The token generated in the settings of the repo and encrypted locally with the travis command:
travis encrypt GITHUB_API_KEY=
--add env.global
Copy the encrypted value and add it to the .travis.yml file:
env: global: secure: <token_encrypted>
Add the deploy directive.
We have to set skip_cleanup: true
to prevent travis to cleanup the local changes hence removing the documentation directory.
Setting keep_history: true
prevents travis to push --force.
Note that index.html has a link that points to the anslibe-aix/ansible-power-aix/README.md file, if we PR that to the IBM/ansible-power-aix repo, will need to fix or remove this link.
Explore if it's possible to push the generated documentation back into github? Specific sub-folder ./documentation