1
- name : build-doc
2
-
1
+ name : Documentation
3
2
on :
3
+ pull_request :
4
4
push :
5
- workflow_call :
5
+ branches : [master]
6
+ workflow_dispatch :
6
7
7
8
jobs :
8
- build-doc :
9
+ build-doc-artifacts :
10
+ name : Build and Upload doc Artifacts
9
11
runs-on : ubuntu-latest
10
12
strategy :
11
13
matrix :
@@ -18,12 +20,13 @@ jobs:
18
20
- name : Checkout Repository
19
21
uses : actions/checkout@v4
20
22
- name : Install Doxygen
21
- run : sudo apt-get install doxygen
22
23
shell : bash
24
+ run : sudo apt-get install doxygen
23
25
- name : Install Graphviz
24
- run : sudo apt-get install graphviz
25
26
shell : bash
27
+ run : sudo apt-get install graphviz
26
28
- name : Create Build Environment
29
+ shell : bash
27
30
run : cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}
28
31
- name : Configure CMake and compile
29
32
shell : bash
36
39
with :
37
40
name : doc_${{matrix.schema}}
38
41
path : ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}/doc/html
42
+
43
+ build-gh-pages-artifact :
44
+ name : Build and Upload Artifact github-pages
45
+ needs : build-doc-artifacts
46
+ if : github.ref == 'refs/heads/master'
47
+ runs-on : ubuntu-latest
48
+ env :
49
+ CIM_1 : CGMES_2.4.13_18DEC2013
50
+ CIM_2 : CGMES_2.4.15_16FEB2016
51
+ CIM_3 : CGMES_2.4.15_27JAN2020
52
+ CIM_4 : CGMES_3.0.0
53
+ steps :
54
+ - name : Checkout Repository
55
+ uses : actions/checkout@v4
56
+ - name : Download
57
+ uses : actions/download-artifact@v4
58
+ - name : Copy
59
+ shell : bash
60
+ run : |
61
+ mkdir -p ./copy_files/docs
62
+ cp -r ./doc_${{env.CIM_1}} ./copy_files/docs/${{env.CIM_1}}
63
+ cp -r ./doc_${{env.CIM_2}} ./copy_files/docs/${{env.CIM_2}}
64
+ cp -r ./doc_${{env.CIM_3}} ./copy_files/docs/${{env.CIM_3}}
65
+ cp -r ./doc_${{env.CIM_4}} ./copy_files/docs/${{env.CIM_4}}
66
+ cp ./README.md ./copy_files/docs/README.md
67
+ - name : Upload Artifact github-pages
68
+ uses : actions/upload-pages-artifact@v3
69
+ with :
70
+ path : ./copy_files
71
+
72
+ deploy-gh-pages :
73
+ name : Deploy github-pages
74
+ needs : build-gh-pages-artifact
75
+ if : github.ref == 'refs/heads/master'
76
+ runs-on : ubuntu-latest
77
+ permissions :
78
+ pages : write
79
+ id-token : write
80
+ environment :
81
+ name : github-pages
82
+ url : ${{steps.deployment.outputs.page_url}}
83
+ steps :
84
+ - name : Deploy to GitHub Pages
85
+ id : deployment
86
+ uses : actions/deploy-pages@v4
0 commit comments