Skip to content

Commit

Permalink
Add docs generation to workflows
Browse files Browse the repository at this point in the history
This uses mdBook to generate a book with all the
docs based of the SUMMARY.md file and with the book.toml
configuration.

Then it builds the book with the docs unders docs in the book/
directory and pushes that to the gh-pages branch which then is
published by github pages, making the docs available

Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Apr 13, 2021
1 parent 4419616 commit ee88cb9
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/docs-book.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Documentation book

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.3'
- run: mdbook build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ bin/
.vscode

# code coverage
coverage.out
coverage.out

book/

7 changes: 7 additions & 0 deletions book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[book]
title = "Hypper documentation"
src = "docs"
create-missing = false

[output.html]
git-repository-url = "https://github.com/rancher-sandbox/hypper"
7 changes: 7 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Summary

- [Hypper Design](./design.md)
- [Installing](./user/tutorials/installing.md)
- [Quick Start](./user/tutorials/quickstart.md)
- [How tos](./user/howto/README.md)
- [Expand a chart with Hypper annotations](./user/howto/expandcharthypper.md)
1 change: 1 addition & 0 deletions docs/user/howto/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This section contains some "How tos" that offer practical advice and detailed instruction in an activity.
2 changes: 1 addition & 1 deletion docs/user/tutorials/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ We do not recommend using development snapshots on your production environment.*

In most cases, installation is as simple as getting a pre-built hypper binary. This document covers additional cases for those who want to do more sophisticated things with Hypper.

Once you have the Hypper Client successfully installed, you can move on to the [quickstart guide](docs/user/tutorials/quickstart.md).
Once you have the Hypper Client successfully installed, you can move on to the [quickstart guide](https://github.com/rancher-sandbox/hypper/docs/user/tutorials/quickstart.md).

[Github Actions]: https://github.com/rancher-sandbox/hypper/actions/workflows/ci.yml?query=branch%3Amain+is%3Asuccess+workflow%3ACI

0 comments on commit ee88cb9

Please sign in to comment.