Skip to content

Commit 60417db

Browse files
committed
Merge branch 'mdbook-example'
2 parents 3b7ddae + 512e0a7 commit 60417db

10 files changed

Lines changed: 849 additions & 546 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: deploy to github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-24.04
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
steps:
18+
- uses: actions/checkout@v5
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up mdbook (v0.4.52)
23+
run: |
24+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.52/mdbook-v0.4.52-x86_64-unknown-linux-gnu.tar.gz | tar -xz
25+
chmod +x mdbook
26+
mv mdbook ~/.cargo/bin/mdbook
27+
28+
- name: Install mdbook-gitinfo (latest)
29+
run: |
30+
curl -fsSLO https://github.com/CompEng0001/mdbook-gitinfo/releases/latest/download/mdbook-gitinfo-linux.tar.gz
31+
tar -xzf mdbook-gitinfo-linux.tar.gz
32+
mv mdbook-gitinfo-linux ~/.cargo/bin/mdbook-gitinfo
33+
34+
- name: Install mdbook-alerts (v.0.8.0)
35+
run: |
36+
curl -fsSLO https://github.com/lambdalisue/rs-mdbook-alerts/releases/download/v0.8.0/mdbook-alerts-x86_64-unknown-linux-gnu
37+
mv mdbook-alerts-x86_64-unknown-linux-gnu ~/.cargo/bin/mdbook-alerts
38+
chmod 700 ~/.cargo/bin/mdbook-alerts
39+
40+
- name: Show mdbook version
41+
run: mdbook --version
42+
- name: Show gitinfo version
43+
run: mdbook-gitinfo --version
44+
- name: Show alerts version
45+
run: mdbook-alerts --version
46+
47+
- run: mdbook build docs
48+
49+
- name: Deploy to github pages
50+
uses: crazy-max/ghaction-github-pages@v4
51+
with:
52+
target_branch: gh-pages
53+
build_dir: docs/book
54+
jekyll: false
55+
env:
56+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target
2+
**/book/*

0 commit comments

Comments
 (0)