Skip to content

Merge pull request #3 from ZEISS/20250917-update-actions #21

Merge pull request #3 from ZEISS/20250917-update-actions

Merge pull request #3 from ZEISS/20250917-update-actions #21

Workflow file for this run

name: Docs
on: [push, pull_request, workflow_dispatch]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install dependencies
run: |
pip install sphinx==8.2.3 sphinx_rtd_theme==3.0.2 sphinx-favicon myst_parser==4.0.1 sphinx_sitemap
- name: Sphinx build
run: |
sphinx-build -W --keep-going doc _build
if [ $? -ne 0 ]; then
echo -e "\033[1;31mSphinx build FAILED\033[0m\n"
exit 1
else
echo -e "\033[1;32mSphinx build PASSED\033[0m\n"
fi
- name: Set branch name
id: branch
run: echo "SUBDIR_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Deploy
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
destination_dir: ${{ env.SUBDIR_NAME }}
full_commit_message: Deploy documentation of '${{ env.SUBDIR_NAME }}' to GitHub Pages