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