diff --git a/.github/workflows/docs-site.yml b/.github/workflows/docs-site.yml new file mode 100644 index 00000000..d14e1805 --- /dev/null +++ b/.github/workflows/docs-site.yml @@ -0,0 +1,78 @@ +name: Documentation site + +on: + pull_request: + branches: [stable] + paths: + - "site_docs/**" + - "mkdocs.yml" + - ".github/workflows/docs-site.yml" + - "docs/QUICKSTART.md" + - "docs/DOCS_SITE.md" + - "README.md" + - "ROADMAP.md" + push: + branches: [stable] + paths: + - "site_docs/**" + - "mkdocs.yml" + - ".github/workflows/docs-site.yml" + - "docs/QUICKSTART.md" + - "docs/DOCS_SITE.md" + - "README.md" + - "ROADMAP.md" + workflow_dispatch: + +permissions: + contents: read + +jobs: + site: + name: Build, verify and preview documentation + runs-on: ubuntu-24.04 + timeout-minutes: 15 + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 + with: + python-version: "3.12" + - name: Install pinned docs tooling (not a runtime dependency) + run: | + python -m pip install --upgrade pip + python -m pip install "zensical==0.1.3" + - name: Build static site + run: zensical build + - name: Check real pages and published-version promises + run: | + python - <<'PY' + from pathlib import Path + pages = { + "home": Path("site/index.html"), + "start": Path("site/getting-started/index.html"), + "migration": Path("site/migration/index.html"), + "features": Path("site/reference/features/index.html"), + "privacy": Path("site/guides/privacy/index.html"), + } + for name, page in pages.items(): + if not page.is_file(): + raise AssertionError((name, page)) + data = page.read_text(encoding="utf-8") + assert "