Skip to content

Commit dbb5f87

Browse files
committed
switch to actions and mdbook
1 parent e22cd4e commit dbb5f87

16 files changed

+51
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches:
5+
- gh-pages
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+
cd grababl-docs
30+
mdbook build
31+
mv book ../public/docs
32+
- name: Setup Pages
33+
uses: actions/configure-pages@v4
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
# Upload entire repository
38+
path: 'public'
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v4

grababl-docs/.gitignore

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

grababl-docs/book.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[book]
2+
authors = ["Niels Saurer"]
3+
language = "en"
4+
src = "src"
5+
title = "Grabapl Documentation"

grababl-docs/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+
- [Chapter 1](./chapter_1.md)

grababl-docs/src/chapter_1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Chapter 1
File renamed without changes.
File renamed without changes.

include_index_js-node_modules_monaco-editor_esm_vs_base_common_worker_lazy_recursive_-node_modules_mo-84a461.5cb12dfba488e2ecd50c.js renamed to public/playground/include_index_js-node_modules_monaco-editor_esm_vs_base_common_worker_lazy_recursive_-node_modules_mo-84a461.5cb12dfba488e2ecd50c.js

File renamed without changes.

0 commit comments

Comments
 (0)