Skip to content

Merge branch 'task/#21677-add-github-actions' into 'integration' #1

Merge branch 'task/#21677-add-github-actions' into 'integration'

Merge branch 'task/#21677-add-github-actions' into 'integration' #1

name: Build Documentation
on: [ push, workflow_dispatch, pull_request ]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Build Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
curl \
expat \
git \
locales \
net-tools \
netcat \
nodejs \
pandoc \
plantuml \
python-is-python3 \
python3-pip \
python3-venv \
wget \
- name: setup python Virtual env
run: |
python -m venv ${{ github.workspace }}/.venv
. ${{ github.workspace }}/.venv/bin/activate
python -m pip install \
beautifulsoup4==4.12.2 \
clang==16.0.1.1 \
sphinx==7.2.6 \
sphinx-c-autodoc==1.3.0 \
sphinx-copybutton==0.5.2 \
sphinx-favicon==1.0.1 \
sphinxcontrib-programoutput==0.17
- name: install libcland 16 for sphinx c autodoc
# needet as long as libclang 16 isn't packaged in ubuntu-latest
run: |
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
echo "" | sudo tee -a /etc/apt/sources.list
echo "# for llvm 16 packages" | sudo tee -a /etc/apt/sources.list
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main" | sudo tee -a /etc/apt/sources.list
cat /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y libclang1-16
sudo ln -s /usr/lib/x86_64-linux-gnu/libclang-16.so.1 /usr/lib/libclang-16.so
- name: Build Documentation
run: ci/build_doc.sh
env:
SPHINX_VENV: "${{ github.workspace }}/.venv"
- name: pack documentation for GitHub pages
run: |
tar \
--dereference --hard-dereference \
--directory "${{ github.workspace }}/build/doc/" \
-cvf "$RUNNER_TEMP/artifact.tar" \
.
- name: save documentation
uses: actions/upload-artifact@v4
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
if-no-files-found: error
publish-gh-pages:
runs-on: ubuntu-latest
if: ${{ github.ref_name == 'main' }}
needs: documentation
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4