Skip to content

[WIP] Support installation of C++20 modules (with non-ROOT functionality) #696

[WIP] Support installation of C++20 modules (with non-ROOT functionality)

[WIP] Support installation of C++20 modules (with non-ROOT functionality) #696

Workflow file for this run

name: publish-doc
on:
push:
branches:
- 'master'
tags:
- v*-*
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: cvmfs-contrib/github-action-cvmfs@10197e000cc0add8e54ac4fb73d3ed44e2de72b4 # v5.5
- uses: aidasoft/run-lcg-view@d8db17c61216548c9192889942d46ff2d7c3a3b6 # v6
with:
container: el9
view-path: /cvmfs/sw-nightlies.hsf.org/key4hep
run: |
echo "::group::Install dependencies"
python3 -m venv /root/doc-gen-venv
source /root/doc-gen-venv/bin/activate
python3 -m pip install -r doc/requirements.txt
export PYTHONPATH=$VIRTUAL_ENV/lib/python3.$(python3 -c 'import sys; print(f"{sys.version_info[1]}")')/site-packages:$PYTHONPATH
echo -e "::endgroup::\n::group::Build podio"
cmake -S . --install-prefix=$(pwd)/install \
--preset full-build \
-DBUILD_TESTING=OFF
cmake --build build --target install
source ./init.sh && source ./env.sh
echo -e "::endgroup::\n::group::build doc"
sphinx-build -M html doc doc_output
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: doc_output/html
publish-doc:
needs: build-doc
runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: gh-pages
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: github-pages
path: doc_artifact
- name: Update documentation
env:
TARGET_DIR: ${{ github.ref_name }}
run: |
mkdir -p ${TARGET_DIR}
rm -rf ${TARGET_DIR}/*
tar -xvf doc_artifact/artifact.tar --directory ${TARGET_DIR}
rm -r doc_artifact
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET_DIR: ${{ github.ref_name }}
run: |
git config --global user.email ${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com
git config --global user.name ${GITHUB_ACTOR}
git add ${TARGET_DIR}
git diff-index --quiet HEAD 2>&1 > /dev/null || git commit -m "Update documentation for ${TARGET_DIR}" && git push