Skip to content

Commit

Permalink
docs: Add mdbook docs
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Dec 19, 2022
1 parent d6ed3e6 commit ed1fbdd
Show file tree
Hide file tree
Showing 10 changed files with 626 additions and 351 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/publish-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: "Publish Docs"

on:
push:
branches: ["main"]
paths: ["docs/**"]
pull_request:
branches: ["main"]
paths: ["docs/**"]

jobs:
publish:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0

- name: Setup mdBook
uses: peaceiris/actions-mdbook@adeb05db28a0c0004681db83893d56c0388ea9ea # v1.2.0

- name: Download mdbook-admonish
uses: robinraju/release-downloader@d6de084c58345d09b017e22701dbcf26977cfd14 # renovate: tag=v1.6
with:
repository: tommilligan/mdbook-admonish
fileName: "*-unknown-linux-gnu.tar.gz"
latest: true

- name: Extract mdbook-admonish
run: |
mkdir -p bin/
tar -xvf $GITHUB_WORKSPACE/*-unknown-linux-gnu.tar.gz -C bin/
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Build docs
working-directory: docs
run: mdbook build

- name: Deploy
uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935 # v3.9.0
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
26 changes: 26 additions & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[book]
authors = ["Devin Buhl"]
language = "en"
multilingual = false
src = "src"
title = "Home Operations"

[output.html]
default-theme = "navy"
preferred-dark-theme = "navy"
git-repository-url = "https://github.com/onedr0p/home-ops"
git-repository-icon = "fa-github"
no-section-label = true
additional-css = ["././mdbook-admonish.css"]

[output.html.playground]
copyable = false

[output.html.search]
limit-results = 15

[preprocessor]

[preprocessor.admonish]
command = "mdbook-admonish"
assets_version = "2.0.0" # do not edit: managed by `mdbook-admonish install`
Loading

0 comments on commit ed1fbdd

Please sign in to comment.