MakerFLOSS/.forgejo/workflows/docs.yml
Claude d51d68abca
All checks were successful
Build docs site / build (push) Successful in 31s
Build slides / build (push) Successful in 53s
fix(docs-ci): install nodejs in python image — actions/checkout needs node
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 21:12:42 +02:00

46 lines
1.3 KiB
YAML

name: Build docs site
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: self-hosted
container:
image: python:3.13-bookworm
volumes:
- /srv/docs-makerfloss/html:/output
steps:
- name: Install git, rsync, nodejs for actions/checkout
run: |
apt-get update -qq
apt-get install -y --no-install-recommends git rsync nodejs
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python dependencies
run: pip install --quiet -r requirements.txt
- name: Regenerate hardware index
run: python3 scripts/gen_overview.py --category hardware
- name: Fail on drift in docs/hardware/index.md
run: |
if ! git diff --exit-code docs/hardware/index.md; then
echo
echo "::error::docs/hardware/index.md is stale."
echo "Regenerate locally via 'make docs-index' and commit the result."
exit 1
fi
- name: Build site (strict)
run: mkdocs build --strict
- name: Publish to /output (main only)
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: rsync -a --delete site/ /output/