Skip to content

Merge pull request #1 from spazyCZ/005-improve-search-ux #1

Merge pull request #1 from spazyCZ/005-improve-search-ux

Merge pull request #1 from spazyCZ/005-improve-search-ux #1

Workflow file for this run

################################################################################
# #
# GITHUB ACTIONS β€” DEPLOY MKDOCS TO GITHUB PAGES #
# #
################################################################################
#
# Builds the MkDocs documentation site (Material theme) and deploys it to
# GitHub Pages using the official `actions/deploy-pages` action.
#
# Triggers:
# - Push to `main` branch when docs/** files change
# - Manual dispatch (workflow_dispatch) for ad-hoc deployments
#
# The workflow uses the "deploy to GitHub Pages via Actions" approach which
# requires the repository Settings β†’ Pages β†’ Source to be set to
# "GitHub Actions" (NOT "Deploy from a branch").
#
################################################################################
name: Deploy Documentation
on:
push:
branches:
- main
paths:
- "docs/user_docs/**"
- ".github/workflows/deploy-docs.yml"
workflow_dispatch:
# -----
# Allow only one concurrent deployment; skip in-progress runs for new pushes
# -----
concurrency:
group: "pages"
cancel-in-progress: true
# -----
# Permissions required for GitHub Pages deployment via Actions
# -----
permissions:
contents: read
pages: write
id-token: write
jobs:
# ==========================================================================
# BUILD β€” Install dependencies and build the MkDocs static site
# ==========================================================================
build:
runs-on: ubuntu-latest
steps:
# -----
# Step 1: Check out the repository
# -----
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for git-revision-date plugin (if added later)
# -----
# Step 2: Set up Python
# -----
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: docs/user_docs/requirements-docs.txt
# -----
# Step 3: Install MkDocs and dependencies
# -----
- name: Install MkDocs dependencies
run: pip install -r docs/user_docs/requirements-docs.txt
# -----
# Step 4: Build the MkDocs site in strict mode
# -----
- name: Build MkDocs site
run: mkdocs build --strict
working-directory: docs/user_docs
# -----
# Step 5: Configure GitHub Pages
# -----
- name: Setup Pages
uses: actions/configure-pages@v5
# -----
# Step 6: Upload the built site as a Pages artifact
# -----
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/user_docs/site
# ==========================================================================
# DEPLOY β€” Publish the built site to GitHub Pages
# ==========================================================================
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# -----
# Deploy the uploaded artifact to GitHub Pages
# -----
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4