ci: fix doc build

This commit is contained in:
Jean-Louis Leroy
2025-10-21 16:33:10 -04:00
parent 386f6979b7
commit 796eed633e

View File

@@ -52,15 +52,20 @@ jobs:
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
antora:
if: ${{ (github.repository_owner == 'boostorg' && github.ref_name == 'master') || (github.repository_owner == 'jll63' && github.ref_name == 'feature/doc') }}
name: Antora Docs
runs-on: ubuntu-latest
name: Antora docs
strategy:
matrix:
include:
- { name: Windows, os: windows-latest }
- { name: Ubuntu, os: ubuntu-latest }
- { name: macOS, os: macos-15 }
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Install packages
uses: alandefreitas/cpp-actions/package-install@v1.8.10
uses: alandefreitas/cpp-actions/package-install@v1.8.8
with:
apt-get: git cmake
@@ -68,7 +73,7 @@ jobs:
uses: actions/checkout@v4
- name: Clone Boost
uses: alandefreitas/cpp-actions/boost-clone@v1.8.10
uses: alandefreitas/cpp-actions/boost-clone@v1.8.8
id: boost-clone
with:
branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }}
@@ -80,7 +85,11 @@ jobs:
with:
node-version: 18
- name: Build Antora Docs
- name: Setup Ninja
if: runner.os == 'Windows'
uses: seanmiddleditch/gha-setup-ninja@v5
- name: Build Antora docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
@@ -89,27 +98,30 @@ jobs:
cd ..
BOOST_SRC_DIR="$(pwd)/boost-source"
export BOOST_SRC_DIR
cd openmethod
cd openmethod
cd doc
bash ./build_antora.sh
# Antora returns zero even if it fails, so we check if the site directory exists
if [ ! -d "build/site" ]; then
# Antora returns zero even if it fails, so we check if the site directory exists.
if [ ! -d "html" ]
then
echo "Antora build failed"
exit 1
fi
- name: Create Antora Docs Artifact
- name: Create Antora docs artifact
uses: actions/upload-artifact@v4
with:
name: antora-docs-${{ matrix.name }}
path: doc/build/site
path: doc/html
- name: Upload static files as artifact
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-pages-artifact@v3
with:
path: doc/build/site
- name: Deploy to GitHub Pages
- name: Deploy to GitHub Pages (jll63)
if: matrix.os == 'ubuntu-latest' && github.repository_owner == 'jll63' && github.ref_name == 'feature/doc'
uses: actions/deploy-pages@v4