Files
wehub-resource-sync a8262fc01e
docs / build (push) Has been cancelled
docs / deploy (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:10:22 +08:00

52 lines
1.2 KiB
YAML

name: docs
# Build the MkDocs Material site and publish it via GitHub Pages.
# Pages "Source" must be set to "GitHub Actions" (Settings -> Pages) — which it already is.
# No gh-pages branch needed; this uses the official Pages deployment actions.
on:
push:
branches: [main]
paths:
- "docs/**"
- "mkdocs.yml"
- "POST_TRAINING.md"
- ".github/workflows/docs.yml"
workflow_dispatch: {}
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install docs dependencies
run: pip install mkdocs mkdocs-material pymdown-extensions
- name: Build the site (strict)
run: mkdocs build --strict --site-dir ./site
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: ./site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4