Skip to content

Commit 4db18d8

Browse files
committed
ci: fix doc build
1 parent 386f697 commit 4db18d8

File tree

1 file changed

+46
-14
lines changed

1 file changed

+46
-14
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,46 @@ jobs:
8080
with:
8181
node-version: 18
8282

83-
- name: Build Antora Docs
83+
84+
antora:
85+
name: Antora docs
86+
strategy:
87+
matrix:
88+
include:
89+
- { name: Windows, os: windows-latest }
90+
- { name: Ubuntu, os: ubuntu-latest }
91+
- { name: macOS, os: macos-15 }
92+
runs-on: ${{ matrix.os }}
93+
defaults:
94+
run:
95+
shell: bash
96+
steps:
97+
- name: Install packages
98+
uses: alandefreitas/cpp-actions/package-install@v1.8.8
99+
with:
100+
apt-get: git cmake
101+
102+
- name: Clone Boost.OpenMethod
103+
uses: actions/checkout@v4
104+
105+
- name: Clone Boost
106+
uses: alandefreitas/cpp-actions/boost-clone@v1.8.8
107+
id: boost-clone
108+
with:
109+
branch: ${{ (github.ref_name == 'master' && github.ref_name) || 'develop' }}
110+
boost-dir: ../boost-source
111+
scan-modules-dir: .
112+
scan-modules-ignore: openmethod
113+
114+
- uses: actions/setup-node@v4
115+
with:
116+
node-version: 18
117+
118+
- name: Setup Ninja
119+
if: runner.os == 'Windows'
120+
uses: seanmiddleditch/gha-setup-ninja@v5
121+
122+
- name: Build Antora docs
84123
env:
85124
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
86125
run: |
@@ -89,27 +128,20 @@ jobs:
89128
cd ..
90129
BOOST_SRC_DIR="$(pwd)/boost-source"
91130
export BOOST_SRC_DIR
92-
cd openmethod
93131
132+
cd openmethod
94133
cd doc
95134
bash ./build_antora.sh
96135
97-
# Antora returns zero even if it fails, so we check if the site directory exists
98-
if [ ! -d "build/site" ]; then
136+
# Antora returns zero even if it fails, so we check if the site directory exists.
137+
if [ ! -d "html" ]
138+
then
99139
echo "Antora build failed"
100140
exit 1
101141
fi
102142
103-
- name: Create Antora Docs Artifact
143+
- name: Create Antora docs artifact
104144
uses: actions/upload-artifact@v4
105145
with:
106146
name: antora-docs-${{ matrix.name }}
107-
path: doc/build/site
108-
109-
- name: Upload static files as artifact
110-
uses: actions/upload-pages-artifact@v3
111-
with:
112-
path: doc/build/site
113-
114-
- name: Deploy to GitHub Pages
115-
uses: actions/deploy-pages@v4
147+
path: doc/html

0 commit comments

Comments
 (0)