@@ -34,33 +34,60 @@ jobs:
34
34
steps :
35
35
- name : Checkout source
36
36
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37
+
37
38
- name : Setup Node.js
38
39
uses : actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
39
40
with :
40
41
node-version : 20
42
+
41
43
- name : Install Mermaid
42
44
run : |
43
45
sudo npm install -g @mermaid-js/[email protected]
44
46
npx puppeteer browsers install chrome-headless-shell
47
+
45
48
- name : Install asciidoctor
46
49
run : |
47
50
sudo apt update
48
51
sudo apt install -y asciidoctor
49
52
sudo gem install asciidoctor asciidoctor-diagram rouge
53
+
54
+ - name : Restore CPM cache
55
+ env :
56
+ cache-name : cpm-cache-0
57
+ id : cpm-cache-restore
58
+ uses : actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
59
+ with :
60
+ path : ~/cpm-cache
61
+ key : ${{runner.os}}-${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
62
+ restore-keys : |
63
+ ${{runner.os}}-${{env.cache-name}}-
64
+
65
+ - name : Configure CMake
66
+ run : cmake -Bbuild -DCPM_SOURCE_CACHE=~/cpm-cache
67
+
68
+ - name : Save CPM cache
69
+ env :
70
+ cache-name : cpm-cache-0
71
+ if : steps.cpm-cache-restore.outputs.cache-hit != 'true'
72
+ uses : actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
73
+ with :
74
+ path : ~/cpm-cache
75
+ key : ${{runner.os}}-${{env.cache-name}}-${{ hashFiles('**/CMakeLists.txt', 'cmake/**') }}
76
+
50
77
- name : Build documentation
51
78
run : |
52
- mkdir -p ./generated-html
53
- asciidoctor -r asciidoctor-diagram docs/index.adoc -D ./generated-html
54
- if [ -e docs/static ]; then cp -rf docs/static ./generated-html; fi
55
- touch ./generated-html/.nojekyll
56
- ls -la ./generated-html
79
+ test $(cmake --build build -v -t docs | grep -c ERROR) == 0
80
+ touch ./build/docs/.nojekyll
81
+ ls -la ./build/docs
82
+
57
83
- name : Setup github pages
58
84
if : needs.configure.outputs.enable_publish == 'true'
59
85
uses : actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
86
+
60
87
- name : Upload artifacts
61
88
uses : actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
62
89
with :
63
- path : ./generated-html
90
+ path : ${{github.workspace}}/build/docs
64
91
65
92
deploy :
66
93
needs : [configure, build]
0 commit comments