Skip to content

Commit

Permalink
Docs build cleanup for #646 (#647)
Browse files Browse the repository at this point in the history
* moving docs build to makefile
  • Loading branch information
yaleman committed Mar 9, 2022
1 parent fa610c6 commit 58fb559
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/kanidm_book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,9 @@ jobs:
toolchain: stable

- uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps
- name: Copy developer readme into book
run: cp DEVELOPER_README.md ./kanidm_book/src/ && echo '- [Developer Guide](DEVELOPER_README.md)' >> ./kanidm_book/src/SUMMARY.md

- name: Run mdbook
run: mdbook build kanidm_book

- name: Move files around
run: mv ./kanidm_book/book/ ./docs/ && mkdir -p ./docs/rustdoc/ && mv ./target/doc/* ./docs/rustdoc/
- name: Run make book
run: make book

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ todo.sh
vendor.tar.*
*.patch
orca/example_profiles/small/orca-edited.toml
docs/
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
.PHONY: help build/kanidmd build/radiusd test/kanidmd push/kanidmd push/radiusd vendor-prep doc install-tools prep vendor
.PHONY: help build/kanidmd build/radiusd test/kanidmd push/kanidmd push/radiusd vendor-prep doc install-tools prep vendor book clean_book

IMAGE_BASE ?= kanidm
IMAGE_VERSION ?= devel
EXT_OPTS ?=
IMAGE_ARCH ?= "linux/amd64,linux/arm64"
ARGS ?= --build-arg "SCCACHE_REDIS=redis://172.24.20.4:6379"

BOOK_VERSION ?= master

.DEFAULT: help
help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##/\n\t/'
Expand Down Expand Up @@ -70,6 +72,17 @@ doc: ## build doc local
doc:
cargo doc --document-private-items

book:
cargo doc --no-deps
mdbook build kanidm_book
mv ./kanidm_book/book/ ./docs/
mkdir -p ./docs/rustdoc/${BOOK_VERSION}
mv ./target/doc/* ./docs/rustdoc/${BOOK_VERSION}/

clean_book:
rm -rf ./docs


install-tools: ## install tools in local environment
install-tools:
cd kanidm_tools && cargo install --path . --force
Expand Down
1 change: 1 addition & 0 deletions kanidm_book/src/DEVELOPER_README.md
1 change: 1 addition & 0 deletions kanidm_book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@
- [RADIUS](./radius.md)
- [LDAP](./ldap.md)
- [Why TLS?](./why_tls.md)
- [Developer Guide](DEVELOPER_README.md)
2 changes: 1 addition & 1 deletion kanidm_book/src/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The intent of the Kanidm project is to:
## Library documentation

Looking for the `rustdoc` documentation for the libraries themselves? [Click here!](./rustdoc/kanidm/)
Looking for the `rustdoc` documentation for the libraries themselves? [Click here!](./rustdoc/master/kanidm/)

## Why do I want Kanidm?

Expand Down

0 comments on commit 58fb559

Please sign in to comment.