Skip to content

Add support for safe-mode #51

Add support for safe-mode

Add support for safe-mode #51

Workflow file for this run

name: build-docs
on:
push:
branches: [ stable, next, main ]
paths:
- 'docs/**'
- 'include/**'
- '.github/workflows/build-docs.yml'
pull_request:
branches: [ stable, next, main ]
paths:
- 'docs/**'
- 'include/**'
- '.github/workflows/build-docs.yml'
# 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.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y doxygen
python -m pip install --upgrade pip
pip install sphinx sphinx-rtd-theme breathe myst-parser
- name: Build documentation
run: |
# Generate Doxygen XML
doxygen docs/Doxyfile
cd docs
# Create necessary directories
mkdir -p _static
# Build HTML documentation
sphinx-build -b html . _build/html \
-D exclude_patterns='["_build", "Thumbs.db", ".DS_Store", "venv", ".venv", "output"]' \
--keep-going 2>&1 | tee build.log
# Check for actual errors (not warnings)
if grep -E "^ERROR|build failed|exited with error" build.log > /dev/null; then
echo "Documentation build had errors!"
exit 1
fi
echo "Documentation built successfully"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/_build/html
retention-days: 7
- name: Setup Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
uses: actions/configure-pages@v5
- name: Upload to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-docs
if: github.event_name == 'push' && github.ref == 'refs/heads/stable'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4