mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +01:00
Docs updates to push all tagged versions + dev (#720)
* docs magic * more docs magic * did I mention I really dislike YAML? * updatey scripty boopydoopy * lock docs down to master * put the symlinked versions up the top of the list * updated readme
This commit is contained in:
parent
a58edc5128
commit
475ada3d6c
14
.github/workflows/kanidm_book.yml
vendored
14
.github/workflows/kanidm_book.yml
vendored
|
@ -1,17 +1,21 @@
|
||||||
name: GitHub Pages
|
name: GitHub Pages
|
||||||
|
|
||||||
on:
|
"on":
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy_book:
|
deploy_book:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
clean: false
|
||||||
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
|
@ -32,8 +36,10 @@ jobs:
|
||||||
|
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
|
|
||||||
- name: Run make book
|
- name: Make all the books
|
||||||
run: make book
|
run: |
|
||||||
|
export
|
||||||
|
./build_all_the_docs.sh
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
|
13
Makefile
13
Makefile
|
@ -79,6 +79,19 @@ book:
|
||||||
mkdir -p ./docs/rustdoc/${BOOK_VERSION}
|
mkdir -p ./docs/rustdoc/${BOOK_VERSION}
|
||||||
mv ./target/doc/* ./docs/rustdoc/${BOOK_VERSION}/
|
mv ./target/doc/* ./docs/rustdoc/${BOOK_VERSION}/
|
||||||
|
|
||||||
|
book_versioned:
|
||||||
|
echo "Book version: ${BOOK_VERSION}"
|
||||||
|
rm -rf ./target/doc
|
||||||
|
git switch -c "${BOOK_VERSION}"
|
||||||
|
git pull origin "${BOOK_VERSION}"
|
||||||
|
cargo doc --no-deps --quiet
|
||||||
|
mdbook build kanidm_book
|
||||||
|
mkdir -p ./docs
|
||||||
|
mv ./kanidm_book/book/ ./docs/${BOOK_VERSION}/
|
||||||
|
mkdir -p ./docs/${BOOK_VERSION}/rustdoc/
|
||||||
|
mv ./target/doc/* ./docs/${BOOK_VERSION}/rustdoc/
|
||||||
|
git switch master
|
||||||
|
|
||||||
clean_book:
|
clean_book:
|
||||||
rm -rf ./docs
|
rm -rf ./docs
|
||||||
|
|
||||||
|
|
13
README.md
13
README.md
|
@ -18,12 +18,13 @@ treated as such.
|
||||||
|
|
||||||
## Documentation / Getting Started / Install
|
## Documentation / Getting Started / Install
|
||||||
|
|
||||||
If you want to deploy Kanidm to see what it can do, you should read the [kanidm book]
|
If you want to deploy Kanidm to see what it can do, you should read the kanidm book.
|
||||||
|
|
||||||
We also publish limited [support guidelines].
|
- [Kanidm book (Latest commit)](https://kanidm.github.io/kanidm/master/)
|
||||||
|
- [Kanidm book (Latest stable)](https://kanidm.github.io/kanidm/stable/)
|
||||||
|
|
||||||
[kanidm book]: https://kanidm.github.io/kanidm/
|
|
||||||
[support guidelines]: https://github.com/kanidm/kanidm/blob/master/project_docs/RELEASE_AND_SUPPORT.md
|
We also publish limited [support guidelines](https://github.com/kanidm/kanidm/blob/master/project_docs/RELEASE_AND_SUPPORT.md)).
|
||||||
|
|
||||||
## Code of Conduct / Ethics
|
## Code of Conduct / Ethics
|
||||||
|
|
||||||
|
@ -47,14 +48,14 @@ If you want to develop on the server, there is a getting started [guide for deve
|
||||||
is a diverse topic and we encourage contributions of many kinds in the project, from people of
|
is a diverse topic and we encourage contributions of many kinds in the project, from people of
|
||||||
all backgrounds.
|
all backgrounds.
|
||||||
|
|
||||||
[guide for developers]: https://github.com/kanidm/kanidm/blob/master/DEVELOPER_README.md
|
[guide for developers]: https://kanidm.github.io/kanidm/master/DEVELOPER_README.html
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
### Implemented
|
### Implemented
|
||||||
|
|
||||||
* SSH key distribution for servers
|
* SSH key distribution for servers
|
||||||
* Pam/nsswitch clients (with limited offline auth)
|
* PAM/nsswitch clients (with limited offline auth)
|
||||||
* MFA - TOTP
|
* MFA - TOTP
|
||||||
* Highly concurrent design (MVCC, COW)
|
* Highly concurrent design (MVCC, COW)
|
||||||
* RADIUS integration
|
* RADIUS integration
|
||||||
|
|
59
build_all_the_docs.sh
Executable file
59
build_all_the_docs.sh
Executable file
|
@ -0,0 +1,59 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
git config --global pull.ff only
|
||||||
|
export CARGO_TARGET_DIR="${TMPDIR}cargo_target"
|
||||||
|
DOCS_DIR="/tmp/kanidm_docs"
|
||||||
|
|
||||||
|
echo "DOCS DIR: ${DOCS_DIR}"
|
||||||
|
echo "PWD: $(pwd)"
|
||||||
|
|
||||||
|
function build_version() {
|
||||||
|
BOOK_VERSION=$1
|
||||||
|
echo "Book version: ${BOOK_VERSION}"
|
||||||
|
echo "<li><a href=\"/kanidm/${BOOK_VERSION}\">${BOOK_VERSION}</a></li>" >> "${DOCS_DIR}/index.html"
|
||||||
|
git switch -c "${BOOK_VERSION}"
|
||||||
|
git pull origin "${BOOK_VERSION}"
|
||||||
|
RUSTFLAGS=-Awarnings cargo doc --quiet --no-deps
|
||||||
|
mdbook build kanidm_book
|
||||||
|
mv ./kanidm_book/book/ "${DOCS_DIR}/${BOOK_VERSION}/"
|
||||||
|
mkdir -p "${DOCS_DIR}/${BOOK_VERSION}/rustdoc/"
|
||||||
|
mv ./target/doc/* "${DOCS_DIR}/${BOOK_VERSION}/rustdoc/"
|
||||||
|
}
|
||||||
|
|
||||||
|
mkdir -p "${DOCS_DIR}"
|
||||||
|
|
||||||
|
cat > "${DOCS_DIR}/index.html" <<-'EOM'
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>kanidm docs root</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>Kanidm docs</h1>
|
||||||
|
<ul>
|
||||||
|
EOM
|
||||||
|
|
||||||
|
|
||||||
|
LATEST="$(git tag -l 'v*' --sort "-version:refname" | grep -v '1.1.0alpha' | head -n1)"
|
||||||
|
{
|
||||||
|
echo "<li><strong><a href=\"/kanidm/master/\">Latest Dev Version</a></strong></li>"
|
||||||
|
echo "<li><strong><a href=\"/kanidm/stable/\">Latest Stable Version (${LATEST})</a></strong></li>"
|
||||||
|
} >> "${DOCS_DIR}/index.html"
|
||||||
|
|
||||||
|
# build the current head
|
||||||
|
build_version master
|
||||||
|
|
||||||
|
# build all the other versions
|
||||||
|
for version in $(git tag -l 'v*' --sort "-version:refname" | grep -v '1.1.0alpha'); do
|
||||||
|
echo "$version"
|
||||||
|
build_version "${version}"
|
||||||
|
done
|
||||||
|
|
||||||
|
cat >> "${DOCS_DIR}/index.html" <<-'EOM'
|
||||||
|
</ul>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOM
|
||||||
|
ls -la "${DOCS_DIR}"
|
||||||
|
|
||||||
|
mv "${DOCS_DIR}" ./docs/
|
||||||
|
ln -s "${LATEST}" ./docs/stable
|
Loading…
Reference in a new issue