Skip to content

👷 (docs): Fix docs deploy #26

👷 (docs): Fix docs deploy

👷 (docs): Fix docs deploy #26

name: Release documentation deployment
on:
push:
tags:
- "v*"
branches:
- dev
concurrency:
group: docs-deploy
permissions:
contents: write
jobs:
build:
name: Building and Deploying Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python runtime
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Ensure latest pip
run: python -m pip install --upgrade pip
- name: Install Hatch
run: pip install --upgrade hatch
- name: Build documentation
run: |
MERINGUE_VERSION=$(hatch version)
if [[ ! "$MERINGUE_VERSION" =~ (dev|alpha|beta) ]]; then
hatch run docs:build-check
fi
- name: Configure Git for GitHub Actions bot
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
- name: Commit documentation
run: |
MERINGUE_DOCS_VERSION=$(hatch version | grep -Eo '[0-9]\.[0-9]+' | head -1)
if [[ "$MERINGUE_VERSION" =~ (dev|alpha|beta|rc) ]]; then
hatch run docs:ci-build dev
else
hatch run docs:ci-build $MERINGUE_DOCS_VERSION --update-aliases latest
fi
- name: Deploy
run: |
git checkout gh-pages
git push origin gh-pages