Skip to content

Gear sonic

Gear sonic #12

Workflow file for this run

name: Build and Deploy Documentation
on:
push:
branches:
- main
- gear-sonic
paths:
- "docs/**"
- ".github/workflows/docs.yml"
- ".gitattributes"
pull_request:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs.yml"
- ".gitattributes"
workflow_dispatch:
# Allow only one concurrent deployment; cancel in-flight runs
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
name: Build Sphinx Docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: "docs/requirements.txt"
- name: Install documentation dependencies
run: pip install -r docs/requirements.txt
- name: Build HTML documentation
run: sphinx-build -b html docs/source docs/build/html
- name: Upload Pages artifact
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/gear-sonic'
uses: actions/upload-pages-artifact@v3
with:
path: docs/build/html
deploy:
name: Deploy to GitHub Pages
needs: build
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/gear-sonic'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4