|
@@ -0,0 +1,83 @@
|
|
1
|
+# SPDX-FileCopyrightText: 2024 Thomas Buck <thomas@xythobuz.de>
|
|
2
|
+# SPDX-License-Identifier: CERN-OHL-S-2.0+
|
|
3
|
+#
|
|
4
|
+# ------------------------------------------------------------------------------
|
|
5
|
+# | Copyright (c) 2024 Thomas Buck <thomas@xythobuz.de> |
|
|
6
|
+# | |
|
|
7
|
+# | This source describes Open Hardware and is licensed under the CERN-OHL-S v2 |
|
|
8
|
+# | or any later version. |
|
|
9
|
+# | |
|
|
10
|
+# | You may redistribute and modify this source and make products using it under |
|
|
11
|
+# | the terms of the CERN-OHL-S v2 (https://ohwr.org/cern_ohl_s_v2.txt) |
|
|
12
|
+# | or any later version. |
|
|
13
|
+# | |
|
|
14
|
+# | This source is distributed WITHOUT ANY EXPRESS OR IMPLIED WARRANTY, |
|
|
15
|
+# | INCLUDING OF MERCHANTABILITY, SATISFACTORY QUALITY AND FITNESS FOR A |
|
|
16
|
+# | PARTICULAR PURPOSE. Please see the CERN-OHL-S v2 (or any later version) |
|
|
17
|
+# | for applicable conditions. |
|
|
18
|
+# | |
|
|
19
|
+# | Source location: https://git.xythobuz.de/thomas/drumkit |
|
|
20
|
+# | |
|
|
21
|
+# | As per CERN-OHL-S v2 section 4, should You produce hardware based on this |
|
|
22
|
+# | source, You must where practicable maintain the Source Location visible |
|
|
23
|
+# | on the external case of the Gizmo or other products you make using this |
|
|
24
|
+# | source. |
|
|
25
|
+# ------------------------------------------------------------------------------
|
|
26
|
+
|
|
27
|
+name: Docs
|
|
28
|
+
|
|
29
|
+# only build single instance of docs for latest main branch
|
|
30
|
+on:
|
|
31
|
+ push:
|
|
32
|
+ branches:
|
|
33
|
+ - master
|
|
34
|
+
|
|
35
|
+jobs:
|
|
36
|
+ deploy:
|
|
37
|
+ runs-on: ubuntu-latest
|
|
38
|
+
|
|
39
|
+ permissions:
|
|
40
|
+ contents: write
|
|
41
|
+ pages: write
|
|
42
|
+ id-token: write
|
|
43
|
+
|
|
44
|
+ steps:
|
|
45
|
+ - name: Checkout repo
|
|
46
|
+ uses: actions/checkout@v4
|
|
47
|
+ with:
|
|
48
|
+ fetch-depth: 0
|
|
49
|
+
|
|
50
|
+ - name: Checkout repo submodules
|
|
51
|
+ run: git submodule update --init
|
|
52
|
+
|
|
53
|
+ - name: Install dependencies
|
|
54
|
+ run: |
|
|
55
|
+ sudo add-apt-repository --yes ppa:kicad/kicad-7.0-releases
|
|
56
|
+ sudo apt update
|
|
57
|
+ sudo apt install -y --install-recommends kicad pipx libfuse2 libegl1 poppler-utils
|
|
58
|
+
|
|
59
|
+ - name: Install latest mdbook
|
|
60
|
+ run: |
|
|
61
|
+ tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
|
|
62
|
+ url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
|
|
63
|
+ mkdir mdbook
|
|
64
|
+ curl -sSL $url | tar -xz --directory=./mdbook
|
|
65
|
+ echo `pwd`/mdbook >> $GITHUB_PATH
|
|
66
|
+
|
|
67
|
+ - name: Generate Plots
|
|
68
|
+ run: pcb/generate_plot.sh
|
|
69
|
+
|
|
70
|
+ - name: Build Book
|
|
71
|
+ run: docs/generate_docs.sh build
|
|
72
|
+
|
|
73
|
+ - name: Setup Pages
|
|
74
|
+ uses: actions/configure-pages@v2
|
|
75
|
+
|
|
76
|
+ - name: Upload artifact
|
|
77
|
+ uses: actions/upload-pages-artifact@v1
|
|
78
|
+ with:
|
|
79
|
+ path: 'docs/book'
|
|
80
|
+
|
|
81
|
+ - name: Deploy to GitHub Pages
|
|
82
|
+ id: deployment
|
|
83
|
+ uses: actions/deploy-pages@v1
|