Skip to content

Commit dc291aa

Browse files
committed
add: mdbook for documentation
1 parent 3097949 commit dc291aa

13 files changed

+60
-0
lines changed

.github/workflows/mdbook.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Source: https://github.com/rust-lang/mdBook/wiki/Automated-Deployment%3A-GitHub-Actions
2+
name: Deploy Book
3+
on: [ push, pull_request ]
4+
# on:
5+
# push:
6+
# branches:
7+
# - master
8+
9+
jobs:
10+
deploy-book:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write # To push a branch
14+
pull-requests: write # To create a PR from that branch
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: Install latest mdbook
20+
run: |
21+
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
22+
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
23+
mkdir mdbook
24+
curl -sSL $url | tar -xz --directory=./mdbook
25+
echo `pwd`/mdbook >> $GITHUB_PATH
26+
- name: Deploy GitHub Pages
27+
run: |
28+
# This assumes your book is in the root of your repository.
29+
# Just add a `cd` here if you need to change to another directory.
30+
cd book
31+
mdbook build
32+
git worktree add gh-pages
33+
git config user.name "Deploy from CI"
34+
git config user.email ""
35+
cd gh-pages
36+
# Delete the ref to avoid keeping history.
37+
git update-ref -d refs/heads/gh-pages
38+
rm -rf *
39+
mv ../book/* .
40+
git add .
41+
git commit -m "Deploy $GITHUB_SHA to gh-pages"
42+
git push --force --set-upstream origin gh-pages

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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[book]
2+
authors = ["EkoNesLeg", "HDVinnie", "Roardom"]
3+
language = "en"
4+
multilingual = false
5+
src = "src"
6+
title = "UNIT3D Documentation"
File renamed without changes.

book/src/SUMMARY.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Summary
2+
3+
- [Introduction](README.md)
4+
- [Basic Tuning](basic_tuning.md)
5+
- [Local Development Arch Linux](local_development_arch_linux.md)
6+
- [Local Development MacOS](local_development_macos.md)
7+
- [Meilisearch Setup](meilisearch_setup.md)
8+
- [Server Management](server_management.md)
9+
- [Sharing Source Code](sharing_source_code.md)
10+
- [Torrent API](torrent_api.md)
11+
- [Upgrading PHP Version](upgrading_php_version.md)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)