noyalib-mcp 0.0.43

Model Context Protocol server exposing noyalib's lossless YAML editing to AI agents
Documentation
name: Documentation

on:
  push:
    branches: [main]
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  build:
    name: Build Documentation
    # CACHE-POISONING GUARD: strict RUSTDOCFLAGS below make this
    # build's fingerprint distinct from any warnings-tolerant docs
    # cache. Isolated CARGO_TARGET_DIR ensures a permissive
    # rustdoc artefact set can't be restored and short-circuit
    # the strict gate.
    runs-on: ubuntu-latest
    env:
      CARGO_TARGET_DIR: ${{ github.workspace }}/target-docs-pages
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

      - name: Install Rust
        uses: dtolnay/rust-toolchain@6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772 # master
        with:
          toolchain: stable

      - name: Cache cargo
        uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
        with:
          workspaces: ". -> target-docs-pages"
          key: docs-pages

      - name: Build documentation (strict)
        # Strengthened RUSTDOCFLAGS catch broken intra-doc links,
        # private intra-doc links surfaced through re-exports, bad
        # codeblock fence attributes, malformed HTML, and bare
        # URLs that should be wrapped in `<https://...>` autolinks.
        # Phase 7.6 of PLAN.md — every broken `[`Type`]` reference
        # in a doc comment now fails the docs build.
        env:
          RUSTDOCFLAGS: >-
            -D warnings
            -D rustdoc::broken_intra_doc_links
            -D rustdoc::private_intra_doc_links
            -D rustdoc::invalid_codeblock_attributes
            -D rustdoc::invalid_html_tags
            -D rustdoc::bare_urls
        run: |
          cargo doc --no-deps --all-features

      - name: Build the User Manual (mdBook)
        run: |
          cargo install --locked mdbook
          mdbook build docs
          scripts/check-docs-links.sh

      - name: Assemble the Pages site
        # Site layout: /          — landing page linking both halves
        #              /noyalib/  — rustdoc (path unchanged from the
        #                           rustdoc-only era, so old links hold)
        #              /manual/   — the mdBook User Manual
        run: |
          set -euo pipefail
          mkdir -p site
          cp -R target-docs-pages/doc/. site/
          cp -R target-book site/manual
          cat > site/index.html <<'HTML'
          <!doctype html><meta charset="utf-8">
          <title>noyalib-mcp documentation</title>
          <style>body{font-family:system-ui;max-width:38rem;margin:4rem auto;line-height:1.6;padding:0 1rem}</style>
          <h1>noyalib-mcp documentation</h1>
          <p><a href="manual/">The noyalib-mcp Manual</a> — guides, architecture, release notes.</p>
          <p><a href="noyalib_mcp/">API reference</a> — rustdoc for the current main branch (releases: <a href="https://docs.rs/noyalib-mcp">docs.rs/noyalib-mcp</a>).</p>
          HTML

      - name: Setup Pages
        uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0

      - name: Upload artifact
        uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
        with:
          path: site

  deploy:
    name: Deploy to GitHub Pages
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1