Skip to content

Commit a590b39

Browse files
committed
docs: set up mdbook
1 parent 784f7bf commit a590b39

File tree

5 files changed

+81
-0
lines changed

5 files changed

+81
-0
lines changed

.github/workflows/gh-pages.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Github Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- '*'
9+
10+
concurrency:
11+
group: "pages"
12+
cancel-in-progress: false
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup mdBook
21+
uses: peaceiris/actions-mdbook@v2
22+
with:
23+
mdbook-version: 'latest'
24+
25+
- run: mdbook build book
26+
27+
deploy:
28+
environment:
29+
name: gh-pages
30+
url: ${{ steps.deployment.outputs.page_url }}
31+
runs-on: ubuntu-latest
32+
permissions:
33+
contents: write
34+
needs: build
35+
steps:
36+
- uses: actions/checkout@v4
37+
38+
- name: Set output directory
39+
run: |
40+
OUTDIR=$(basename ${{ github.ref }})
41+
echo "OUTDIR=$OUTDIR" >> $GITHUB_ENV
42+
43+
- name: Deploy stable
44+
uses: peaceiris/actions-gh-pages@v4
45+
if: startswith(github.ref, 'refs/tags/')
46+
with:
47+
github_token: ${{ secrets.GITHUB_TOKEN }}
48+
publish_dir: ./book/book
49+
50+
- name: Deploy
51+
uses: peaceiris/actions-gh-pages@v4
52+
with:
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
publish_dir: ./book/book
55+
destination_dir: ./${{ env.OUTDIR }}

book/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
book

book/book.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[book]
2+
authors = ["Adam Perkowski"]
3+
language = "en"
4+
multilingual = false
5+
src = "src"
6+
title = "HighlightOS"
7+
8+
[output.html]
9+
cname = "os.adamperkowski.dev"
10+
#default-theme = "colibri"
11+
#preferred-dark-theme = "colibri"
12+
git-repository-url = "https://github.com/adamperkowski/highlightos"
13+
edit-url-template = "https://github.com/adamperkowski/highlightos/edit/master/book/{path}"
14+
#additional-css = ["custom.css"]
15+
16+
[output.html.search]
17+
use-boolean-and = true

book/src/SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Summary
2+
3+
- [HighlightOS](./highlightos.md)

book/src/highlightos.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# HighlightOS
2+
3+
x86_64 OS (kernel) made completely from scratch in Assembly & Rust
4+
5+
Documentation for bleeding-edge main can be found at [https://os.adamperkowski.dev/main](https://os.adamperkowski.dev/main).

0 commit comments

Comments
 (0)