Skip to content

Commit cb3a1b8

Browse files
committed
Integrated build-gh-pages.yml into build-doc.yml (similar to build-doc.yml for cimpy)
Signed-off-by: Thomas Günther <[email protected]>
1 parent 027e9c8 commit cb3a1b8

File tree

2 files changed

+54
-39
lines changed

2 files changed

+54
-39
lines changed

.github/workflows/build-doc.yml

+54-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
name: build-doc
2-
1+
name: Documentation
32
on:
3+
pull_request:
44
push:
5-
workflow_call:
5+
branches: [master]
6+
workflow_dispatch:
67

78
jobs:
8-
build-doc:
9+
build-doc-artifacts:
10+
name: Build and Upload doc Artifacts
911
runs-on: ubuntu-latest
1012
strategy:
1113
matrix:
@@ -18,12 +20,13 @@ jobs:
1820
- name: Checkout Repository
1921
uses: actions/checkout@v4
2022
- name: Install Doxygen
21-
run: sudo apt-get install doxygen
2223
shell: bash
24+
run: sudo apt-get install doxygen
2325
- name: Install Graphviz
24-
run: sudo apt-get install graphviz
2526
shell: bash
27+
run: sudo apt-get install graphviz
2628
- name: Create Build Environment
29+
shell: bash
2730
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}
2831
- name: Configure CMake and compile
2932
shell: bash
@@ -36,3 +39,48 @@ jobs:
3639
with:
3740
name: doc_${{matrix.schema}}
3841
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

.github/workflows/build-gh-pages.yml

-33
This file was deleted.

0 commit comments

Comments
 (0)