Files
musrfit/.gitea/workflows/deploy-pages.yml
T
suter_aandClaude Sonnet 5 8c02237bf3
Build and Deploy Documentation / build-and-deploy (push) Successful in 22s
ci: fix version extraction, grep -oP unsupported on Alpine/BusyBox
The gitea-pages workflow runs in the alpine-jupyterbook container,
whose grep lacks PCRE (-P) support, so the version-extraction step
failed. Use a portable awk field scan instead, and fail loudly if
the version can't be found.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-26 10:54:04 +02:00

55 lines
1.5 KiB
YAML

name: Build and Deploy Documentation
on:
push:
branches:
- root6
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: gitea.psi.ch/images/alpine-jupyterbook
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install system dependencies
run: |
apk add doxygen graphviz
- name: Extract project version from CMakeLists.txt
run: |
VERSION=$(awk '/project\(musrfit/{for(i=1;i<=NF;i++) if($i=="VERSION"){print $(i+1); exit}}' CMakeLists.txt)
if [ -z "$VERSION" ]; then
echo "Could not extract musrfit version from CMakeLists.txt" >&2
exit 1
fi
echo "MUSRFIT_VERSION=$VERSION" >> $GITHUB_ENV
- name: Build musrfit-tech-docu
run: |
cd doc
mkdir technical
doxygen musrfit_dox.cfg
doxygen musredit_qt6_dox.cfg
doxygen mupp_qt6_dox.cfg
doxygen musrStep_qt6_dox.cfg
doxygen musrWiz_qt6_dox.cfg
- name: Configure Git
run: |
git config --global user.name "Gitea Actions"
git config --global user.email "actions@gitea.local"
- name: Push to gitea-pages branch
run: |
git checkout --orphan gitea-pages
git reset --hard
cp -r ./doc/technical/html/* .
git add .
git commit -m "Deploy site"
git push --verbose -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages