Skip to content

Merge pull request #3 from MeteoSwiss/fix/docs-workflow #2

Merge pull request #3 from MeteoSwiss/fix/docs-workflow

Merge pull request #3 from MeteoSwiss/fix/docs-workflow #2

Workflow file for this run

# This workflow will build and publish the documentation to the `gh-pages` branch of the
# repository when a new tag is added.
# It uses the `peaceiris/actions-gh-pages` action to handle the publishing.
#
# Copyright (c) 2025 MeteoSwiss, based on the workflow created by Michele Cattaneo; michele.cattaneo@meteoswiss.ch
name: docs_publish
on:
push:
branches: ['main']
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install poetry and python package
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
- name: Build documentation
run: poetry run sphinx-build doc doc/_build
- name: Publish documentation
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: doc/_build/
force_orphan: true