Files
AI-Video/.github/workflows/docs.yml
2025-11-07 16:59:12 +08:00

46 lines
1.0 KiB
YAML

name: Deploy Documentation
on:
push:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'
- '.github/workflows/docs.yml'
workflow_dispatch: # Allow manual trigger
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for git-revision-date-localized plugin
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-docs.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements-docs.txt
- name: Build and deploy documentation
run: mkdocs gh-deploy --force