Skip to content

Fix deploy pages warning #53

Fix deploy pages warning

Fix deploy pages warning #53

Workflow file for this run

name: Documentation
on:
pull_request:
push:
branches: [master]
jobs:
build-doc-artifacts:
name: Build and Upload doc Artifacts
runs-on: ubuntu-latest
strategy:
matrix:
schema:
- CGMES_2.4.15_27JAN2020
- CGMES_3.0.0
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Doxygen
shell: bash
run: sudo apt-get install doxygen
- name: Install Graphviz
shell: bash
run: sudo apt-get install graphviz
- name: Create Build Environment
shell: bash
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}
- name: Configure CMake and compile
shell: bash
working-directory: ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}/
run: |
cmake ../.. -DUSE_CIM_VERSION=${{matrix.schema}}
make -j4 doc
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: doc_${{matrix.schema}}
path: ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}/doc/html
build-gh-pages-artifact:
name: Build and Upload Artifact github-pages
needs: build-doc-artifacts
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
env:
CIM_1: CGMES_2.4.15_27JAN2020
CIM_2: CGMES_3.0.0
steps:
- name: Download
uses: actions/download-artifact@v4
- name: Copy
shell: bash
run: |
mkdir -p ./copy_files/docs
cp -r ./doc_${{env.CIM_1}} ./copy_files/docs/${{env.CIM_1}}
cp -r ./doc_${{env.CIM_2}} ./copy_files/docs/${{env.CIM_2}}
echo "<html><head><meta http-equiv='refresh' content='0; url=${{env.CIM_1}}/index.html' /></head></html>" >./copy_files/docs/index.html
- name: Upload Artifact github-pages
uses: actions/upload-pages-artifact@v3
with:
path: ./copy_files/docs
deploy-gh-pages:
name: Deploy github-pages
needs: build-gh-pages-artifact
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4