Skip to content

Commit

Permalink
docs: set up mdbook
Browse files Browse the repository at this point in the history
  • Loading branch information
adamperkowski committed Nov 9, 2024
1 parent 784f7bf commit 2b8abb2
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Github Pages

on:
push:
branches:
- main
tags:
- '*'
workflow_dispatch:

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: 'latest'

- run: mdbook build book

deploy:
environment:
name: gh-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
permissions:
contents: write
needs: build
steps:
- name: Set output directory
run: |
OUTDIR=$(basename ${{ github.ref }})
echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV
- name: Deploy stable
uses: peaceiris/actions-gh-pages@v4
if: startswith(github.ref, 'refs/tags/')
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/book
destination_dir: ./${{ env.OUTDIR }}
1 change: 1 addition & 0 deletions book/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
17 changes: 17 additions & 0 deletions book/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[book]
authors = ["Adam Perkowski"]
language = "en"
multilingual = false
src = "src"
title = "HighlightOS"

[output.html]
cname = "os.adamperkowski.dev"
#default-theme = "colibri"
#preferred-dark-theme = "colibri"
git-repository-url = "https://github.com/adamperkowski/highlightos"
edit-url-template = "https://github.com/adamperkowski/highlightos/edit/master/book/{path}"
#additional-css = ["custom.css"]

[output.html.search]
use-boolean-and = true
3 changes: 3 additions & 0 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Summary

- [HighlightOS](./highlightos.md)
5 changes: 5 additions & 0 deletions book/src/highlightos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# HighlightOS

x86_64 OS (kernel) made completely from scratch in Assembly & Rust

Documentation for bleeding-edge main can be found at [https://os.adamperkowski.dev/main](https://os.adamperkowski.dev/main).

0 comments on commit 2b8abb2

Please sign in to comment.