Skip to content

Commit 94ac78c

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 94ac78c

File tree

2 files changed

+53
-39
lines changed

2 files changed

+53
-39
lines changed

.github/workflows/build-doc.yml

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

77
jobs:
8-
build-doc:
8+
build-doc-artifacts:
9+
name: Build and Upload doc Artifacts
910
runs-on: ubuntu-latest
1011
strategy:
1112
matrix:
@@ -18,12 +19,13 @@ jobs:
1819
- name: Checkout Repository
1920
uses: actions/checkout@v4
2021
- name: Install Doxygen
21-
run: sudo apt-get install doxygen
2222
shell: bash
23+
run: sudo apt-get install doxygen
2324
- name: Install Graphviz
24-
run: sudo apt-get install graphviz
2525
shell: bash
26+
run: sudo apt-get install graphviz
2627
- name: Create Build Environment
28+
shell: bash
2729
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}
2830
- name: Configure CMake and compile
2931
shell: bash
@@ -36,3 +38,48 @@ jobs:
3638
with:
3739
name: doc_${{matrix.schema}}
3840
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

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

-33
This file was deleted.

0 commit comments

Comments
 (0)