Files
semantica/.github/workflows/docs.yml
T
KaifAhmad1andClaude Sonnet 4.6 1aee4dfd29 ci: scope workflows to avoid redundant docs deploys and benchmark runs
- docs.yml: remove semantica/** path trigger (was deploying docs on every
  source code push); add release:[published] so docs still deploy on releases
- benchmark.yml: remove pull_request trigger (heavy deps - torch/spacy/faiss);
  add paths-ignore for doc-only main pushes; add workflow_dispatch for manual runs
- ci.yml: add paths-ignore so doc-only changes skip build; add pytest step
  so tests actually run in CI (was build-only before)
- security-scan.yml: add paths-ignore on push/pull_request; schedule runs unaffected

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 23:15:18 +05:30

81 lines
1.9 KiB
YAML

name: Build and Deploy Documentation
# This workflow builds the documentation site and deploys it to GitHub Pages
# It runs when changes are pushed to the 'docs' folder on the main branch
on:
push:
branches: [main]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'requirements-docs.txt'
- 'CHANGELOG.md'
- 'RELEASE.md'
release:
types: [published]
workflow_dispatch:
# Permissions needed to deploy to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Prevent concurrent deployments
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install documentation dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-docs.txt
- name: Build documentation
# Builds the static site using MkDocs
run: mkdocs build --strict
- name: Check for broken links
# Optional: checks if any links in the docs are broken
run: |
pip install linkchecker || echo "Skipping link check"
if [ -d "site" ]; then
linkchecker site/ --check-extern || echo "Link check completed"
fi
continue-on-error: true
- name: Setup Pages
uses: actions/configure-pages@v4
continue-on-error: true
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site
deploy:
name: Deploy to GitHub Pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4