Skip to content

Commit 40c8f93

Browse files
author
samamou
committed
run barebones mdbook in ci
1 parent e1bd7dc commit 40c8f93

File tree

6 files changed

+60
-0
lines changed

6 files changed

+60
-0
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy docs via gh pages
2+
3+
on:
4+
push:
5+
branches: [master, docs/mdbook]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write # To push a branch
12+
pages: write # To push to a GitHub Pages site
13+
id-token: write # To update the deployment status
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
- name: Install latest mdbook
19+
run: |
20+
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
21+
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
22+
mkdir mdbook
23+
curl -sSL $url | tar -xz --directory=./mdbook
24+
echo `pwd`/mdbook >> $GITHUB_PATH
25+
- name: Build Book
26+
run: |
27+
# This assumes your book is in the root of your repository.
28+
# Just add a `cd` here if you need to change to another directory.
29+
mdbook build
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v4
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
# Upload entire repository
36+
path: 'book'
37+
- name: Deploy to GitHub Pages
38+
id: deployment
39+
uses: actions/deploy-pages@v4

book.toml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[book]
2+
title = "Koaia"
3+
description = "Documentation for Koaia — a GUI for exploring generative AI"
4+
authors = ["Société des Arts Technologiques"]
5+
language = "en"
6+
7+
[build]
8+
build-dir = "book"
9+
10+
[output.html]
11+
default-theme = "auto"
12+
preferred-dark-theme = "navy"
13+
git-repository-url = "https://github.com/sat-mtl/koaia"

src/README.md

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

src/SUMMARY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Summary
2+
3+
[Introduction](README.md)
4+
[Installation](installation.md)
5+
[Usage](usage.md)

src/installation.md

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

src/usage.md

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

0 commit comments

Comments
 (0)